Pytbull
From Aldeid
Comments
Share this article Tweet it! Email this Digg it Share on Facebook
|
22:19, 30 April 2011 (CEST)
@l0renz0: I've added a new section: Architecture. It explains how the reverse shell works. If you have any other question, feel free to ask.
|
|
22:11, 3 May 2011 (CEST)
Great stuff, I love to see new testing tools, and am glad you have support for Suricata.
|
|
00:59, 17 May 2011 (CEST)
@l0renz0: no confusion, there's no need to install a pytbull server. Actually the only thing that you *install* on the server is a reverse shell. You could also do it with netcat, by opening port 12345/tcp on the server. On the other hand, either traffic goes thru your Snort probe (gateway mode) and you can download malicious PDF files from the client that is running pytbull, or you remotely make the server download the files from the client (standalone mode), using the reverse shell. Refer to the online resources for more information on how it works.
|
|
Keith
16:37, 17 May 2011 (CEST)
Hi, I like the sound of this tool and think it's very interesting and will be useful. However, I'm having some issues running it from BT5, I get the following errors:
File "./pytbull.py", line 507, in <module> oPytbull.doAllTests()
File "./pytbull.py", line 319, in doAllTests
self.getAlertsFile()
File "./pytbull.py", line 352, in getAlertsFile
ftp.retrbinary("RETR %s" % alertsFile, f.write)
File "/usr/lib/python2.6/ftplib.py", line 394, in retrbinary
conn = self.transfercmd(cmd, rest)
File "/usr/lib/python2.6/ftplib.py", line 356, in transfercmd
return self.ntransfercmd(cmd, rest)[0]
File "/usr/lib/python2.6/ftplib.py", line 327, in ntransfercmd
resp = self.sendcmd(cmd)
File "/usr/lib/python2.6/ftplib.py", line 243, in sendcmd
return self.getresp()
File "/usr/lib/python2.6/ftplib.py", line 218, in getresp
raise error_perm, resp
ftplib.error_perm: 550 Failed to open file.
Any ideas as to that ftplib error? I modified the config file in BT5 so that the paths work with the following options if this helps others wanting to us it with BT5: [PATHS] report = report.html sudo = /usr/bin/sudo nmap = /usr/local/bin/nmap nikto = /pentest/web/nikto/nikto.pl niktoconf = /pentest/web/nikto/nikto.conf hping3 = /usr/sbin/hping3 tcpreplay = /pentest/sniffers/tcpreplay/tcpreplay urlpdf = http://droid-protector.com/borrar_ya/md5 alertsfile = /var/log/snort/alertThanks |
|
07:42, 18 May 2011 (CEST)
@Keith: Please upgrade via svn to r50, I just added error handling for getAlertsFile() function.
|
|
11:05, 18 May 2011 (CEST)
@Keith: seems like a socket can't be established on port 80/tcp. On the remote IDS, install apache (sudo apt-get install apache2)
|
|
11:15, 18 May 2011 (CEST)
@Keith: please update to svn rev51, I've added a new test (on port 80/tcp). Thx for reporting this bug!
|
|
Keith
14:45, 18 May 2011 (CEST)
Hmm... that diagram didn't turn out well at all, the BT5 Client is obviously in the LAN and the BT5 Server is in the DMZ.
Cheers Keith |
|
09:35, 19 May 2011 (CEST)
@Keith: please update to svn rev52, I've added a new test (on port 22/tcp). The test that failed was sending "/bin/sh" to port 22/tcp. Most probably closed on your remote host. Thx for reporting this bug!
|
|
Eduardo
07:25, 20 May 2011 (CEST)
I am having some trouble testing a network behind a firewall, in a server runing snort.
Could u plz help me? Ps. I did all the steps listed above, but when i try to run the program i get this error. I am using ubuntu 10.10... root@ubuntu:/opt/pytbull# ./pytbull.py -t 172.16.13.2
WARNING: No route found for IPv6 destination :: (no default route?)
_ _ _ _
_ __ _ _| |_| |__ _ _| | |
| '_ \| | | | __| '_ \| | | | | |
| |_) | |_| | |_| |_) | |_| | | |
| .__/ \__, |\__|_.__/ \__,_|_|_|
|_| |___/
Sebastien Damaye, aldeid.com
Traceback (most recent call last):
File "./pytbull.py", line 540, in <module>
oPytbull = Pytbull(banner, options.target)
File "./pytbull.py", line 61, in __init__
version = self.checkNewVersionAvailable()
File "./pytbull.py", line 188, in checkNewVersionAvailable
available = urllib2.urlopen('http://pytbull.googlecode.com/svn/trunk/docs/
VERSION').read()
File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.6/urllib2.py", line 391, in open
response = self._open(req, data)
File "/usr/lib/python2.6/urllib2.py", line 409, in _open
'_open', req)
File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib/python2.6/urllib2.py", line 1170, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.6/urllib2.py", line 1145, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno -2] Name or service not known>
|
|
08:19, 20 May 2011 (CEST)
@Keith: Many thanks for this feedback. I've updated the path for tcpreplay in your previous comment. Also update to rev 53, you have now the possibility to choose the port for the reverse shell. Many thanks for the suggestion mate!
|
|
09:52, 21 May 2011 (CEST)
Hi all, please notice that pytbull has now its dedicated page on sourceforge: http://pytbull.sourceforge.net. Please report any bug or feature suggestions to this site. Thank you for your understanding.
|
|
09:54, 21 May 2011 (CEST)
@Eduardo: could you please upgrade to latest release (1.3) and try your test again. Contact me if you still get the error. Eventually file a bug on sourceforge. Thanks!
|
|
Caveman
12:12, 2 June 2011 (CEST)
I had the same errors as Eduardo.
***ERROR in checkNewVersionAvailable: <urlopen error [Errno -2] Name or service not known>Any solution to this? :( |
|
13:42, 2 June 2011 (CEST)
@Caveman: Please file a bug in sourceforge: http://sourceforge.net/tracker/?group_id=547041&atid=2220536 and specify the version you use in the "Group" dropdown list. Thanks.
|
|
Caveman
03:04, 3 June 2011 (CEST)
I have submitted a bug report as you requested though I am not sure it's a bug (more likely my misconfiguration). I hope that you can help me :)
|
|
11:12, 3 June 2011 (CEST)
@Caveman: I've moved your topic to the support tracker (https://sourceforge.net/tracker/?func=detail&aid=3310897&group_id=547041&atid=2220537) since it seems to be a configuration issue rather than a bug. Thanks for your understanding
|
|
Caveman
11:36, 3 June 2011 (CEST)
I've read your comment and yes it's true that I actually disabled the Internet (and replaced it with static IP). I'll try again later. Thanks for your help!! :)
|
|
chathra
13:07, 23 November 2011 (MST)
Hi. Is it possible to test ciscoIOS IPS using pytbull ? If its possible can u give us a brief idea.......Thanking you.......
|
