diff --git a/Scanner.src b/Scanner.src
index 0fd53f8..9bc5918 100644
--- a/Scanner.src
+++ b/Scanner.src
@@ -1,24 +1,31 @@
+// name import Database/functions
import_code("/root/myprogram")
-if params.len == 0 then exit("Usage: scanner [IP]")
+if params.len == 0 then exit("Usage: scanner [IP/WEB_Address]")
+
+// import metaexploit from /lib or current folder
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")
+// convert argv for easier readability
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
- exit("That domain is not valid.")
+if not is_valid_ip(target_ip) then
+ target_ip = nslookup(target_ip)
+ if not is_valid_ip(target_ip) then exit("Usage: scanner [IP/WEB_Address]")
end if
+// fetch router object en configured ports
target_router = get_router(target_ip)
target_ports = target_router.used_ports
+// print details of router and configured ports
+// TODO: Add port status
+// TODO: Add deepscan for connected devices
column = "Number Type Version IP"
column = column + "\n" + "0" + " " + "kernel_router" + " " + target_router.kernel_version + " " + target_router.local_ip
for port in target_ports
@@ -29,7 +36,8 @@ print("\nIP Address : " + target_ip)
print(format_columns(column))
-
+// Trying to figure out what privileges the connected user has by checking what permissions are avaiable on commen files.
+// TODO: Needs confirming, initial tests seem correct.
checkPrivilege = function(result)
if(typeof(result) == "shell") then result = result.host_computer
if(typeof(result) == "computer") then
@@ -45,6 +53,10 @@ checkPrivilege = function(result)
return "null"
end function
+
+// scan port on IP address. Set optional local ip address for extra kernel_router exploits and a password for pass change exploits
+// TODO: figure out how to get proper feedback from firewall exploits and pass change exploits.
+// TODO: figure out how to get requirments for exploits.
scanPort = function(ip, port, optional)
net_session = metaxploit.net_use(ip,port)
@@ -71,7 +83,7 @@ end function
-
+// DO ALL THE THINGS. needs cleaning
scanPort(target_ip, 0, target_router.local_ip)
for port in target_ports
diff --git a/database.src b/database.src
index 2fa8480..0cd8f24 100644
--- a/database.src
+++ b/database.src
@@ -1,15 +1,21 @@
+// import database lib
import_code("/home/Dave/libbindb.src")
+// connect to database
myDB = BinDB.connect("vuln", "Fizeta7-Nyzi0=Sinuvi5-Golepa4", ["kernel_router.so", "libssh.so", "libftp.so","libsql.so","libsmtp.so","libhttp.so","libcam.so","librepository.so"], "/database")
+// insert exploit with check if it already exists.
+// TODO: Add option to update missing data (requirments)
insertVuln = function(libName,libVersion,memAdress,keyValue,requirments,object,priv)
data = myDB.fetchBy(libName, "version", libVersion)
if data.len != 0 then
for entry in data
- if entry.indexOf(memAdress) != -1 then print("Vuln Already known")
+ if(entry.indexOf(memAdress) != null and entry.indexOf(keyValue) != null) then
+ print("Vuln Already Known")
+ return 0
+ end if
end for
- else
- myDB.insert(libName, {"version": libVersion, "memory_adress": memAdress, "key_value": keyValue, "requirments": requirments, "object": object, "Privilege": priv})
end if
-
+ myDB.insert(libName, {"version": libVersion, "memory_adress": memAdress, "key_value": keyValue, "requirments": requirments, "object": object, "privilege": priv})
+ myDB.write()
end function
diff --git a/kernel 3.3.1.src b/kernel 3.3.1.src
index dbf0973..990822e 100644
--- a/kernel 3.3.1.src
+++ b/kernel 3.3.1.src
@@ -1,3 +1,4 @@
+// fetch data from specific kernel_router.so 3.3.1
if params.len != 1 or params[0] == "-h" or params[0] == "--help" then exit("Usage: "+program_path.split("/")[-1]+" [ip_address]")
metaxploit = include_lib("/lib/metaxploit.so")
if not metaxploit then
diff --git a/kernel3.7.7.src b/kernel3.7.7.src
index ce0171d..8784347 100644
--- a/kernel3.7.7.src
+++ b/kernel3.7.7.src
@@ -1,3 +1,4 @@
+// open firewall router_kernel.so 3.7.7
if params.len != 1 or params[0] == "-h" or params[0] == "--help" then exit("Usage: "+program_path.split("/")[-1]+" [ip_address]")
metaxploit = include_lib("/lib/metaxploit.so")
diff --git a/kernel_fetch_data.src b/kernel_fetch_data.src
index d929d14..eb975a0 100644
--- a/kernel_fetch_data.src
+++ b/kernel_fetch_data.src
@@ -1,3 +1,4 @@
+// Fetch data any kernel_router.so if you have a Memory_Address and Overflow_Key with a computer object.
if params.len < 4 or params[0] == "-h" or params[0] == "--help" then exit("Usage: "+program_path.split("/")[-1]+" [IP_Address] [Lan_IP] [Memory_Address] [Overflow_String]")
routerip = params[0]