Author Topic: Increasing Attack Vectors  (Read 2283 times)

0 Members and 1 Guest are viewing this topic.

Offline Thor

  • Serf
  • *
  • Posts: 29
  • Cookies: 15
  • whoami?
    • View Profile
Increasing Attack Vectors
« on: August 01, 2013, 02:07:47 am »
[NOTICE: This post assumes that your friend owns the server he is using, and that everything running on the server is owned and controlled by him]

INTRO

In this post I will be explaining how to increase attack vectors (the number of ways into a target), allowing you to own websites which previously appeared to be secure.

So you're running a security audit on a friends websites, so far everything seems fine. There are no known vulnerabilities in the web software he's running, and there doesn't appear to be any vulnerable plugins either. The services running on the server also appear to be secure, So... what do you do?

Finding Other Domains

What you're looking at looks secure, so you want to expand what you're looking at. The first thing we're going to do is look for other websites running on the same server, often admins will run more than one website on their server, they may also have a personal blog or some other site hosted there too and these may be vulnerable.


To find other domains which point to the ip address of your friends server we can use Bing. Bings search engine has an "ip" operator, so typing "ip:x.x.x.x" returns any websites Bing has crawled which have the ip "x.x.x.x".
Another way we can do this is using the following service: link
Enter in the target domain name or ip address and it will return all the domains it knows that point to the same ip.

[NOTICE: When using either of these, always confirm the results, occasionally they may be outdated.]



DNS Enumeration

The next thing we're going to do is find subdomains for your friends domain. We want to do this because different subdomans are likely to point to different web applications, some of which may be vulnerable.

We are going to use a tool called dnsenum. It can be downloaded from here: https://code.google.com/p/dnsenum/
If you are running Kali or BackTrack you should already have it.

Dnsenum uses a CLI, so you will need to use terminal here.
Dnsenum is very simple to use, and will perform 3 different checks to find subdomains set up by your friend.

Test 1
First of all it will request a zone transfer from the name servers used by your friend. If this works you've hit the jackpot, you will now be able to see all the subdomains and the ip address they point to.

Test 2
The second test is a bruteforce one, using a wordlist of common subdomains, it queeries the name server for each of them, reporting any valid subdomains back to you. This can take several minutes dependng on the size of the wordlist. Dnsenum comes with it's own wordlist which you can use. In Kali linux it is located at /usr/share/dnsenum/dns.txt
NOTICE: If the name server uses wildcards this will not work and dnsenum will skip this test.

Test 3
The third test queeries whois to find the netrange your friends hosting provider uses, then queeries every ip for your friends domain, to find if your friends owns any of these servers. This will rarely succeed and it can take a lot of time, so in my opinion it isn't worth running it unless you are targeting a larger network, such as that owned by a large company.

An example output of dnsenum running on Kali Linux is shown below.
For this example I have chosed securityoverride.org, one of evilzones partners.
The command: dnsenum -f /usr/share/dnsenum/dns.txt securityoverride.org



In some cases not all of the subdomains point to the same ip, however they are still worth checking out. Often the same login credentials are used over several different servers, so if you gain access to one of them, you may gain access to them all.

Extra

Another thing you can do is a reverse dns lookup of the email address your friend used to register his domain. This will look through domain registration records for your friends email and you may find other domains he has registered, some of which may be active, and they may even point to the same server.

DirBuster is another great tool for discovering hidden content hosted on the same server, but I'll save that for another time.

Side Note
Try using dnsenum on manchester.ac.uk (Manchester University), you will see just how much information this tool can provide.
« Last Edit: August 01, 2013, 05:11:00 pm by Thor »
They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.

Offline Snayler

  • Baron
  • ****
  • Posts: 812
  • Cookies: 135
    • View Profile
Re: Increasing Attack Vectors
« Reply #1 on: August 01, 2013, 02:19:29 am »
Interesting read, specially the DNS enumeration part. Here, have a cookie:

« Last Edit: August 01, 2013, 02:20:51 am by Snayler »

Offline proxx

  • Avatarception
  • Global Moderator
  • Titan
  • *
  • Posts: 2803
  • Cookies: 256
  • ФФФ
    • View Profile
Re: Increasing Attack Vectors
« Reply #2 on: August 01, 2013, 06:23:41 am »
Reminds me of DNSmap.
https://code.google.com/p/dnsmap/

Nice write-up Thor, excellent start, keep that up :)
« Last Edit: August 01, 2013, 06:24:29 am by proxx »
Wtf where you thinking with that signature? - Phage.
This was another little experiment *evillaughter - Proxx.
Evilception... - Phage

Offline imation

  • Peasant
  • *
  • Posts: 141
  • Cookies: 2
    • View Profile
Re: Increasing Attack Vectors
« Reply #3 on: August 01, 2013, 09:23:13 am »
Nice one +1

Offline Darkvision

  • EZ's Fluffer
  • VIP
  • Royal Highness
  • *
  • Posts: 755
  • Cookies: 149
  • Its not a bug, It's a Chilopodas.
    • View Profile
Re: Increasing Attack Vectors
« Reply #4 on: August 01, 2013, 08:34:42 pm »
love seeing new ppl jump right in. thanks for this. have a cookie.
The internet: where men are men, women are men, and children are FBI agents.

Ahh, EvilZone.  Where networking certification meets avian fecal matter & all is explained, for better or worse.

<Phage> I used an entrence I never use

Offline Mordred

  • Knight
  • **
  • Posts: 360
  • Cookies: 135
  • Nvllivs in Verba
    • View Profile
Re: Increasing Attack Vectors
« Reply #5 on: August 01, 2013, 09:14:34 pm »
Very good read, thank you!
\x57\x68\x79\x20\x64\x69\x64\x20\x79\x6f\x75\x20\x65\x76\x65\x6e\x20\x66\x75\x63\x6b\x69\x6e\x67\x20\x73\x70\x65\x6e\x64\x20\x74\x68\x65\x20\x74\x69\x6d\x65\x20\x74\x6f\x20\x64\x65\x63\x6f\x64\x65\x20\x74\x68\x69\x73\x20\x6e\x69\x67\x67\x72\x3f\x20\x44\x61\x66\x75\x71\x20\x69\x73\x20\x77\x72\x6f\x6e\x67\x20\x77\x69\x74\x68\x20\x79\x6f\x75\x2e