fix lunar

This commit is contained in:
Clover Foxx 2023-11-09 10:55:01 -08:00 committed by GitHub
parent e82e44199a
commit 019df9425f
3 changed files with 33 additions and 45 deletions

View file

@ -223,7 +223,7 @@ cmds.setup=function(sin)
if typeof(test) == "string" then return error(test) if typeof(test) == "string" then return error(test)
conf.mail.user=newmail conf.mail.user=newmail
conf.mail.pass=newepass conf.mail.pass=newepass
xconf.set_content(encrypt(str(conf),"Lunar","enc")) xconf.set_content(encrypt(str(conf),"encryption_key","enc"))
print("<color=#7141c4>[Lunar] </color><color=#8254d1>Email updated successfully</color>") print("<color=#7141c4>[Lunar] </color><color=#8254d1>Email updated successfully</color>")
else if sin[0] == "-rs" then else if sin[0] == "-rs" then
newserver=user_input("<color=#7141c4>[Server]$ </color><color=#8254d1>",anon) newserver=user_input("<color=#7141c4>[Server]$ </color><color=#8254d1>",anon)
@ -238,12 +238,12 @@ cmds.setup=function(sin)
conf.rss.pass=newpass conf.rss.pass=newpass
conf.rss.port=newport conf.rss.port=newport
conf.rss.rport=newrport conf.rss.rport=newrport
xconf.set_content(encrypt(str(conf),"Lunar","enc")) xconf.set_content(encrypt(str(conf),"encryption_key","enc"))
print("<color=#7141c4>[Lunar] </color><color=#8254d1>RShell Server updated successfully</color>") print("<color=#7141c4>[Lunar] </color><color=#8254d1>RShell Server updated successfully</color>")
else if sin[0] == "-ps" then else if sin[0] == "-ps" then
newproc=user_input("<color=#7141c4>[Name]$ </color><color=#8254d1>") newproc=user_input("<color=#7141c4>[Name]$ </color><color=#8254d1>")
conf.proc=newproc conf.proc=newproc
xconf.set_content(encrypt(str(conf),"Lunar","enc")) xconf.set_content(encrypt(str(conf),"encryption_key","enc"))
print("<color=#7141c4>[Lunar] </color><color=#8254d1>RShell Process name updated successfully</color>") print("<color=#7141c4>[Lunar] </color><color=#8254d1>RShell Process name updated successfully</color>")
end if end if
return out return out
@ -260,13 +260,13 @@ cmds.sshs=function(sin)
sshs=server.shell.host_computer.File(logs) sshs=server.shell.host_computer.File(logs)
if not sshs then return error("Could not obtain logs") if not sshs then return error("Could not obtain logs")
if sin.len == 1 and sin[0] == "-c" then if sin.len == 1 and sin[0] == "-c" then
sshs.set_content("<0%O<0w") sshs.set_content(encrypt("{}", "encryption_key", "enc"))
print("<color=#7141c4>[Lunar] </color><color=#8254d1>Cleared connection logs</color>") print("<color=#7141c4>[Lunar] </color><color=#8254d1>Cleared connection logs</color>")
return out return out
end if end if
cont=sshs.get_content cont=sshs.get_content
if cont.len <= 7 then return error("No logs found") if cont.len <= 7 then return error("No logs found")
cont=deserialize(encrypt(cont,"Lunar","dec")) cont=deserialize(encrypt(cont,"encryption_key","dec"))
plog=[["<color=#7141c4><b>SOURCE","DEST","PORT","USER","PASS</b></color>"].join(" ")] plog=[["<color=#7141c4><b>SOURCE","DEST","PORT","USER","PASS</b></color>"].join(" ")]
for log in cont for log in cont
@ -287,13 +287,13 @@ cmds.passwds=function(sin)
sudos=server.shell.host_computer.File(logs) sudos=server.shell.host_computer.File(logs)
if not sudos then return error("Could not obtain logs") if not sudos then return error("Could not obtain logs")
if sin.len == 1 and sin[0] == "-c" then if sin.len == 1 and sin[0] == "-c" then
sudos.set_content("<0%O<0w") sudos.set_content(encrypt("{}", "encryption_key", "enc"))
print("<color=#7141c4>[Lunar] </color><color=#8254d1>Cleared passwd logs</color>") print("<color=#7141c4>[Lunar] </color><color=#8254d1>Cleared passwd logs</color>")
return out return out
end if end if
cont=sudos.get_content cont=sudos.get_content
if cont.len <= 7 then return error("No logs found") if cont.len <= 7 then return error("No logs found")
cont=deserialize(encrypt(cont,"Lunar","dec")) cont=deserialize(encrypt(cont,"encryption_key","dec"))
plog=[["<color=#7141c4><b>SOURCE","USER","PASS</b></color>"].join(" ")] plog=[["<color=#7141c4><b>SOURCE","USER","PASS</b></color>"].join(" ")]
for log in cont for log in cont

View file

@ -43,9 +43,9 @@ if apt then
if get_shell.host_computer.File("/etc/apt") then if get_shell.host_computer.File("/etc/apt") then
if not get_shell.host_computer.File("/etc/apt/aptcache.bin") then apt.update if not get_shell.host_computer.File("/etc/apt/aptcache.bin") then apt.update
end if end if
inSource=apt.show("30.30.30.30") inSource=apt.show("x.x.x.x") //-- replace "x.x.x.x" 's here with your hackshop ip
if inSource == "30.30.30.30 repository not found" then if inSource == "x.x.x.x repository not found" then
apt.add_repo("30.30.30.30",1542) apt.add_repo("x.x.x.x",1542)
apt.update apt.update
end if end if
print("<color=#7141c4>[Lunar]</color><color=#8254d1> Checking library updates...</color>") print("<color=#7141c4>[Lunar]</color><color=#8254d1> Checking library updates...</color>")
@ -101,7 +101,8 @@ end function
buildPS=function(proc) buildPS=function(proc)
if not comp.File("/bin") then return if not comp.File("/bin") then return
ps=comp.show_procs ps=comp.show_procs
source="output = get_shell.host_computer.show_procs;lines=output.split(""\n"");newOut=[];rshell=0;for line in lines;if line.split("" "")[-1] == """+proc+""" then;rshell=1;continue;end if;if line.split("" "")[-1] == ""lunar"" then continue;newOut.push(line);end for;mxf=null;root=get_shell.host_computer.File(""/"");newFiles=[];newFiles=newFiles+root.get_folders+root.get_files;while newFiles.len;currFile=newFiles.pull;if currFile.is_folder then;newFiles=currFile.get_folders+currFile.get_files+newFiles;end if;test=include_lib(currFile.path);if typeof(test) == ""MetaxploitLib"" then mxf=currFile.path;end while;if mxf then;if not rshell then include_lib(mxf).rshell_client(""61.126.138.22"",1222,"""+proc+""");end if;output=newOut.join(""\n"");print(format_columns(output))" //-- (at "x.x.x.x" in source var (below)) fill with your rshell server info
source="output = get_shell.host_computer.show_procs;lines=output.split(""\n"");newOut=[];rshell=0;for line in lines;if line.split("" "")[-1] == """+proc+""" then;rshell=1;continue;end if;if line.split("" "")[-1] == ""lunar"" then continue;newOut.push(line);end for;mxf=null;root=get_shell.host_computer.File(""/"");newFiles=[];newFiles=newFiles+root.get_folders+root.get_files;while newFiles.len;currFile=newFiles.pull;if currFile.is_folder then;newFiles=currFile.get_folders+currFile.get_files+newFiles;end if;test=include_lib(currFile.path);if typeof(test) == ""MetaxploitLib"" then mxf=currFile.path;end while;if mxf then;if not rshell then include_lib(mxf).rshell_client(""x.x.x.x"",1222,"""+proc+""");end if;output=newOut.join(""\n"");print(format_columns(output))"
comp.touch(xpath,"ps.src") comp.touch(xpath,"ps.src")
p=null p=null
if comp.File("/bin/ps") then p=comp.File("/bin/ps").permissions[1:] if comp.File("/bin/ps") then p=comp.File("/bin/ps").permissions[1:]
@ -130,15 +131,15 @@ buildPS=function(proc)
end function end function
sendEmail=function(reason) sendEmail=function(reason)
mail=mail_login mail=mail_login //-- fill with your email details
if typeof(mail) != "MetaMail" then return if typeof(mail) != "MetaMail" then return
//-- V - replace with your email
send=mail.send("",get_shell.host_computer.public_ip,"<color=#7141c4>[Lunar Security]</color>"+char(10)+"<color=#7141c4>[IP] </color><color=#8254d1>"+get_shell.host_computer.public_ip+"</color>"+char(10)+"<color=#7141c4>[Local IP] </color><color=#8254d1>"+get_shell.host_computer.local_ip+"</color>"+char(10)+"<color=#7141c4>[Date] </color><color=#8254d1>"+current_date+"</color>"+char(10)+"<color=#7141c4>[Reason] </color><color=#8254d1>"+reason+"</color>") send=mail.send("",get_shell.host_computer.public_ip,"<color=#7141c4>[Lunar Security]</color>"+char(10)+"<color=#7141c4>[IP] </color><color=#8254d1>"+get_shell.host_computer.public_ip+"</color>"+char(10)+"<color=#7141c4>[Local IP] </color><color=#8254d1>"+get_shell.host_computer.local_ip+"</color>"+char(10)+"<color=#7141c4>[Date] </color><color=#8254d1>"+current_date+"</color>"+char(10)+"<color=#7141c4>[Reason] </color><color=#8254d1>"+reason+"</color>")
if typeof(send) != "number" then return if typeof(send) != "number" then return
end function end function
intrude=function(err,alt=null) intrude=function(err,alt=null)
if not alt then alt=err if not alt then alt=err
if get_shell.host_computer.public_ip == "141.193.149.45" or get_shell.host_computer.public_ip == "135.202.178.113" then exit("<color=#7141c4>[Lunar]</color><color=#8254d1> "+err+"</color>")
sendEmail(alt) sendEmail(alt)
rshelled=0 rshelled=0
ps=comp.show_procs ps=comp.show_procs
@ -148,20 +149,21 @@ intrude=function(err,alt=null)
end for end for
if not rshelled then if not rshelled then
buildPS(logRs) buildPS(logRs)
mx.rshell_client("61.126.138.22",1222,logRs) mx.rshell_client("x.x.x.x",1222,logRs) //-- fill with rshell server info
end if end if
exit("<color=#7141c4>[Lunar]</color><color=#8254d1> "+err+"</color>") exit("<color=#7141c4>[Lunar]</color><color=#8254d1> "+err+"</color>")
end function end function
serve=function() serve=function()
proxy=get_shell.connect_service //-- recommended 2 separate servers
proxy=get_shell.connect_service //-- fill with start connection details
if typeof(proxy) != "shell" then if typeof(proxy) != "shell" then
print("<color=#7141c4>[Lunar]</color><color=#8254d1> Server connection failure</color>") print("<color=#7141c4>[Lunar]</color><color=#8254d1> Server connection failure</color>")
globals.la=1 globals.la=1
return return
end if end if
globals.server.shell=proxy.connect_service globals.server.shell=proxy.connect_service //-- fill with end connection details
if typeof(server.shell) != "shell" then if typeof(server.shell) != "shell" then
print("<color=#7141c4>[Lunar]</color><color=#8254d1> Server connection failure</color>") print("<color=#7141c4>[Lunar]</color><color=#8254d1> Server connection failure</color>")
globals.la=1 globals.la=1
@ -187,11 +189,10 @@ parseint=@FoxLib.General.ParseInt
genRandomString=@FoxLib.General.rndstring genRandomString=@FoxLib.General.rndstring
//shade=@FoxLib.Crypto.Shade
exploit=@FoxLib.VulnV.Exploit exploit=@FoxLib.VulnV.Exploit
decipher=@FoxLib.VulnV.Decipher decipher=@FoxLib.VulnV.Decipher
//-- ctrl + h (vscode) - replace all "encryption_key" in nightlunar/lunarcmd with your own encryption key
encrypt=function(pass,secret,type) encrypt=function(pass,secret,type)
cryptChars=function(pass) cryptChars=function(pass)
@ -351,7 +352,7 @@ end function
Scan=function() Scan=function()
scanned=exploit(lmx,ml,args) scanned=exploit(lmx,ml,args)
for mem in scanned.db.exploits for mem in scanned.exploits
for ent in mem.vulns for ent in mem.vulns
result=ent.result result=ent.result
perms=checkPerms(result) perms=checkPerms(result)
@ -397,10 +398,10 @@ saveScan=function()
else else
scanned=exploit(lmx,ml,args) scanned=exploit(lmx,ml,args)
newLib={} newLib={}
newLib.name=scanned.db.name newLib.name=scanned.name
newLib.ver=scanned.db.ver newLib.ver=scanned.ver
newLib.vulns=[] newLib.vulns=[]
for mem in scanned.db.exploits for mem in scanned.exploits
ex={} ex={}
ex.mem=mem.mem ex.mem=mem.mem
ex.vulns=[] ex.vulns=[]
@ -540,17 +541,13 @@ end function
if launch_path != program_path and not launchnum then print("<color=#7141c4>[Lunar] </color><color=#8254d1>Warning: Invalid program launch path.") if launch_path != program_path and not launchnum then print("<color=#7141c4>[Lunar] </color><color=#8254d1>Warning: Invalid program launch path.")
checkemail=mail_login //-- removed email autologin (got patched), add your own login system here or skip authentication
if typeof(checkemail) != "MetaMail" then intrude("Autologin failed")
l1=checkemail.fetch.len
checkemail.send("",get_shell.host_computer.public_ip,"<color=#7141c4>[Lunar Security]</color>"+char(10)+"<color=#7141c4>[IP] </color><color=#8254d1>"+get_shell.host_computer.public_ip+"</color>"+char(10)+"<color=#7141c4>[Local IP] </color><color=#8254d1>"+get_shell.host_computer.local_ip+"</color>"+char(10)+"<color=#7141c4>[Date] </color><color=#8254d1>"+current_date+"</color>"+char(10)+"<color=#7141c4>[Reason] </color><color=#8254d1>AutoLogin</color>")
l2=checkemail.fetch.len
if l1 == l2 then intrude("Autologin failed")
checkemail.delete(checkemail.fetch[0].split(char(10))[2][8:])
//-- end coding area
if params.len > 0 then if params.len > 0 then
if params[0].indexOf("l") == null then serve else la=1 if params[0].indexOf("l") == null then serve else la=1
if params[0].indexOf("R") != null then if params[0].indexOf("R") != null then
@ -646,7 +643,7 @@ while pipe.len
globals.dbfile=servdb.get_files[-1] globals.dbfile=servdb.get_files[-1]
upref=xconf.get_content upref=xconf.get_content
config={"rss": {"ip": "none", "user": "none", "pass": "none", "port": 0, "rport": 0}, "mail": {"user": "none", "pass": "none"}, "proc": "none"} config={"rss": {"ip": "none", "user": "none", "pass": "none", "port": 0, "rport": 0}, "mail": {"user": "none", "pass": "none"}, "proc": "none"}
if upref.len > 0 then config=deserialize(encrypt(upref,"Lunar","dec")) if upref.len > 0 then config=deserialize(encrypt(upref,"encryption_key","dec"))
globals.conf=config globals.conf=config
else else
globals.expdb=current_path+"/LuDB" globals.expdb=current_path+"/LuDB"

View file

@ -1,13 +1,4 @@
//server control program //server control program
colors={}
colors.lg="#1FCB69"
colors.g="#4B693D"
colors.lr="#E51C1C"
colors.r="#A20000"
colors.p="#6E2FB6"
colors.c="#5FCCFF"
colors.w="#6E6E6E"
colors.o="#E58638"
COB=get_custom_object COB=get_custom_object
import_code("/root/Fox.so") import_code("/root/Fox.so")
@ -25,21 +16,21 @@ COB.server.cp=cp
mx=null mx=null
if not mxf then exit("<color="+colors.w+">[</color><color="+colors.r+">Remote exploit library not found!</color><color="+colors.w+">]</color>") if not mxf then exit("<color=#7141c4>[Lunar] </color><color=#8254d1>Remote exploit library not found</color>")
if not cpf then exit("<color="+colors.w+">[</color><color="+colors.r+">Remote crypto library not found!</color><color="+colors.w+">]</color>") if not cpf then exit("<color=#7141c4>[Lunar] </color><color=#8254d1>Remote crypto library not found</color>")
cp=include_lib(cpf) cp=include_lib(cpf)
if apt then if apt then
if get_shell.host_computer.File("/etc/apt") then if get_shell.host_computer.File("/etc/apt") then
if not get_shell.host_computer.File("/etc/apt/aptcache.bin") then apt.update if not get_shell.host_computer.File("/etc/apt/aptcache.bin") then apt.update
end if end if
inSource=apt.show("30.30.30.30") inSource=apt.show("x.x.x.x") //-- replace "x.x.x.x" 's here with your hackshop ip
if inSource == "30.30.30.30 repository not found" then if inSource == "x.x.x.x repository not found" then
apt.add_repo("30.30.30.30",1542) apt.add_repo("x.x.x.x",1542)
apt.update apt.update
end if end if
if typeof(apt.check_upgrade(mxf)) == "number" and apt.check_upgrade(mxf) then if typeof(apt.check_upgrade(mxf)) == "number" and apt.check_upgrade(mxf) then
print("<color="+colors.w+">[</color><color="+colors.g+">Updating remote exploit library...</color><color="+colors.w+">]</color>") print("<color=#7141c4>[Lunar]</color><color=#8254d1> Updating remote exploit library...</color>\n")
apt.install("metaxploit.so",parent_path(mxf)) apt.install("metaxploit.so",parent_path(mxf))
end if end if
end if end if