PTT – The Pen Testing Toolkit: Websearch

In the last post I have shown how to research some Information in DNS using PTT – The Pen Testing Toolkit. But there should be more. Since everything of interest is on the Web nowadays, we will search the web.

If you installed PTT this morning you are already outdated. Get r801 here.

For the next step you need some adtitionsl modules: google and yahoo. You can use python bin/ptt-confcheck to see if it is installed:

md@hextatic ~ptt$ python bin/ptt-confcheck
I will check now if every is in place for the pen testing toolkit.
checking for module 'google' ... ok
checking for module 'yahoo' ... ok
checking for module 'ADNS' ... ok
checking for module 'OpenSSL' ... ok
checking for programm 'nmap' ...
checking for programm 'unicornscan' line 1: unicornscan: command not found
checking for SIGINFO ... ok

If you miss the python google and yahoo bindings, and your package managment system does not provide them, try this:

md@hextatic ~/ptt$ cd thirdparty/
md@hextatic ~/ptt$ tar xzvf pygoogle-0.6.tar.gz
md@hextatic ~/ptt$ cd pygoogle-0.6
md@hextatic ~/ptt/pygoogle-0.6$ python build
md@hextatic ~/ptt/pygoogle-0.6$ sudo python install
md@hextatic ~/ptt$ cd ..
md@hextatic ~/ptt$ sudo rm -Rf pygoogle-0.6
md@hextatic ~/ptt$ tar xzvf yws-1.2.tgz 
md@hextatic ~/ptt$ (cd yws-1.2/python/pYsearch-1.3/; 
                    sudo python install)
md@hextatic ~/ptt$ sudo rm -Rf yws-1.2

Try bin/ptt-confcheck to se if you successfully installed the stuff. Then go back to the directorycreated for our tests. We will look further into the Deutsche Bank.

md@hextatic ~/ptttest$ echo '' > target-domains.txt
md@hextatic ~/ptttest$ echo '' >> target-domains.txt
md@hextatic ~/ptttest$ echo '' >> target-domains.txt
md@hextatic ~/ptttest$ ptt-dnsbruteforce
[wait a long time]
md@hextatic ~/ptttest$ sort -u output/dnsbruteforce.txt target-domains.txt  > t
md@hextatic ~/ptttest$ mv t target-domains.txt

Now that we have a solid basis of host- and domainnames to work from, we add some hints on what might be a good searchterms for finding information related to our target.

echo "Deutsche Bank" > searchterms.txt # not that creative, he?

We start ptt-webharvest-hostsandemail which is menat to collect hostnames and E-Mailaddresses. ptt-webharvest-hostsandemail is very slow so don’t hold your breath while it is running.

ptt-webharvest-hostsandemail first tries to use major search engines (MSN, Google and Yahoo for now) to find hostnames not known to us so far by using the site: operator.

To be somewhat more agile, ptt-webharvest-hostsandemail creates a cache directory in the current pwd called „cache„. This directory can get VERY (several GB) big, but you may delete it whenever you want.

md@hextatic ~/ptttest$ python ptt-webharvest-hostsandemail 
searching for ''
53 results
Set([u'', u'', u'',
u'', u'',
u'', u'', 
u'', u'', u'',
u'', u'', u'',
u'', u'', u'',
u'', u'', u'',
u'', u'',
u'', u'',
u'', u'', u'',
u'', u'', u'',
searching for ''
146 results
'www.environment.deut [...]'
53 results
Set([u'', u'',
u'', u''])

In the next step we search for sites containing searchterms read from searchterms.txt and hostnames read from with half a dozen searchengines, download the pages containing this terms and parsee them for hostnames and emailadresses. This Process basically takes forever.

searching for ''
3 results Set(['', '',
'']) Set([]) Set(['', '']) Set([])
searching for 'link:'
5 results Set(['']) Set([]) Set(['', 'wob.[...]']) Set([])
searching for 'link:'
4 results Set(['']) Set([])
searching for 'link:'
12 results Set(['', [...] 
Set([[...] '', '', 'www.[...]']) Set([])

As you see, we find lot’s of hostnames obviously not directly related to the organiosation we are exploring. How to filter for interesting stuff will be explained in another posting.

One comment on “PTT – The Pen Testing Toolkit: Websearch

  1. pichiboochi
    2009-06-17 at 03:28 #

    thanks for the info -cheers-

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

Du kommentierst mit Deinem Abmelden / Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s