fixed missing files/content
This commit is contained in:
@@ -0,0 +1,43 @@
|
|||||||
|
get_bank = function(target_ip, local_ip, mem, key)
|
||||||
|
|
||||||
|
metaxploit = include_lib("/lib/metaxploit.so")
|
||||||
|
if not metaxploit then
|
||||||
|
metaxploit = include_lib(current_path + "/metaxploit.so")
|
||||||
|
end if
|
||||||
|
if not metaxploit then exit("Error: Can't find metaxploit library in the /lib path or the current folder")
|
||||||
|
|
||||||
|
net_session = metaxploit.net_use( target_ip )
|
||||||
|
if not net_session then exit("Error: can't connect to net session")
|
||||||
|
|
||||||
|
libKernel = net_session.dump_lib
|
||||||
|
libName = "kernel_router.so"
|
||||||
|
print("Searching " + libName +" ...")
|
||||||
|
if not libKernel then exit("Error: " + libName + " not found.")
|
||||||
|
|
||||||
|
result = libKernel.overflow(mem, key, local_ip)
|
||||||
|
|
||||||
|
|
||||||
|
if(typeof(result) == "shell") then
|
||||||
|
result = typeObject.host_computer
|
||||||
|
|
||||||
|
if(typeof(result) != "computer") then exit("Error: expected computer, obtained " + typeof(result))
|
||||||
|
|
||||||
|
output = ""
|
||||||
|
homeFolder = result.File("/home")
|
||||||
|
if not homeFolder then
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
print("------BANK------")
|
||||||
|
|
||||||
|
for userFolder in userFolders
|
||||||
|
bankFile = result.File("/home/" + userFolder.name + "/Config/Bank.txt")
|
||||||
|
if not bankFile then continue
|
||||||
|
if not bankFile.has_permission("r") then exit("Error: can't read file contents. Permission deniend")
|
||||||
|
userPass = bankFile.get_content.split(":")
|
||||||
|
output = output + userPass[0] + " : " + userPass[1] + "\n"
|
||||||
|
print(userPass[0] + "\n" + userPass[1] + "\n")
|
||||||
|
end for
|
||||||
|
end if
|
||||||
|
|
||||||
|
return output
|
||||||
|
end function
|
||||||
@@ -14,4 +14,4 @@ result = metaLib.overflow("0x7D764A89","olor_buttonshowbuttonim")
|
|||||||
|
|
||||||
if not result then exit("Program ended")
|
if not result then exit("Program ended")
|
||||||
|
|
||||||
result.start_terminal
|
if typeof(result) == "shell" then result.start_terminal
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
//comment out if using a stand alone tool
|
//comment out if using a stand alone tool
|
||||||
nmap = function(target_ip)
|
nmap = function(target_ip)
|
||||||
|
|
||||||
//uncomment is not using as import.
|
//uncomment if not using as import.
|
||||||
//if params.len != 1 or params[0] == "-h" or params[0] == "--help" then exit("<b>Usage: "+program_path.split("/")[-1]+" [ip_address]</b>")
|
//if params.len != 1 or params[0] == "-h" or params[0] == "--help" then exit("<b>Usage: "+program_path.split("/")[-1]+" [ip_address]</b>")
|
||||||
|
|
||||||
target_ip = params[0]
|
target_ip = params[0]
|
||||||
if not is_valid_ip(target_ip) then exit(target_ip + " is not a valid ip")
|
|
||||||
|
|
||||||
if nslookup(target_ip) == "Not found" then
|
if not (is_valid_ip(target_ip)) then target_ip = nslookup(target_ip)
|
||||||
|
|
||||||
|
if not (is_valid_ip(target_ip)) then
|
||||||
exit("<color=red><b>That domain is not valid.</b></color>")
|
exit("<color=red><b>That domain is not valid.</b></color>")
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
import_code("/tool/nmap.src")
|
||||||
|
import_code("/tool/get_bank.src")
|
||||||
|
|
||||||
|
target_ip = params[0]
|
||||||
|
|
||||||
|
if not (is_valid_ip(target_ip)) then target_ip = nslookup(target_ip)
|
||||||
|
|
||||||
|
if not (is_valid_ip(target_ip)) then
|
||||||
|
exit("<color=red><b>That domain is not valid.</b></color>")
|
||||||
|
end if
|
||||||
|
|
||||||
|
router_data = nmap(target_ip)
|
||||||
|
|
||||||
|
metaxploit = include_lib("/lib/metaxploit.so")
|
||||||
|
if not metaxploit then
|
||||||
|
metaxploit = include_lib(current_path + "/metaxploit.so")
|
||||||
|
end if
|
||||||
|
if not metaxploit then exit("Error: Can't find metaxploit library in the /lib path or the current folder")
|
||||||
|
|
||||||
|
|
||||||
|
local_ip = []
|
||||||
|
|
||||||
|
for item in router_data
|
||||||
|
known = false
|
||||||
|
for ip in local_ip
|
||||||
|
if ip == item.lan_ip then
|
||||||
|
known = true
|
||||||
|
end if
|
||||||
|
end for
|
||||||
|
if not known then
|
||||||
|
local_ip.push(item.lan_ip)
|
||||||
|
end if
|
||||||
|
end for
|
||||||
|
|
||||||
|
net_session = metaxploit.net_use(target_ip,80)
|
||||||
|
|
||||||
|
lib = net_session.dump_lib
|
||||||
|
memList = metaxploit.scan(lib)
|
||||||
|
|
||||||
|
vuln = []
|
||||||
|
|
||||||
|
for address in memList
|
||||||
|
keys = metaxploit.scan_address(lib,address)
|
||||||
|
keys = metaxploit.scan_address(lib,address)
|
||||||
|
vulns = keys.split("Unsafe check: ")
|
||||||
|
keyList =[]
|
||||||
|
|
||||||
|
for string in vulns
|
||||||
|
keyList.push(string[string.indexOf("<b>")+3:string.indexOf("</b>")])
|
||||||
|
end for
|
||||||
|
|
||||||
|
for key in keyList
|
||||||
|
result = lib.overflow(address,key,local_ip[0])
|
||||||
|
if typeof(result) == "computer" or typeof(result) == "shell" then
|
||||||
|
vuln.push(address)
|
||||||
|
vuln.push(key)
|
||||||
|
break
|
||||||
|
end if
|
||||||
|
end for
|
||||||
|
end for
|
||||||
|
|
||||||
|
|
||||||
|
if not len(vuln) == 0 then
|
||||||
|
for ip in local_ip
|
||||||
|
details = get_bank(target_ip, ip , vuln[0], vuln[1])
|
||||||
|
end for
|
||||||
|
end if
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user