Any good penetration test should start with a discovery phase. The tests are conducted over periods very short (usually a few days) and the only way to experience the target is to get to know. But here, where to go in the allotted time? There are certainly things to automate.
Why this post?
A discovery phase is a stage that we will achieve consistently. And there are tests recurring and let's face it, as this phase of discovery is important, as we only wish for a "IT" as the regulars say, is to go on the attack! So I propose to give the tracks to be a dedicated script the discovery phase.
At the same time, it actually gives a summary of discovery tools are very useful to us every day:) NB: Actually, there are certainly tools that already do that. However, I offer my version here in my feedback. And this post is unique in the sense that it is open: your opinions are welcome (as always elsewhere as they are constructive;).
Y has what program?
1 / What does layer 3?
We begin here by analyzing
ICMP requests. What what is allowed or not? Ping requests TSTAMP via ICMP traceroute, a good filtering of the target is required, otherwise we will be able to map the target. Nothing complicated here because the tools in question are well known (
Ping, Traceroute ,
Sing, etc..) But we use many options these tools?
2 / Who is our target? Internet often contains very interesting information on our target. In bulk, we can mention:
type WHOIS queries (eg Dmitry )
scripts to search names / emails of employees such as theHarvester ;
- scripts to retrieve documents (unfortunately?) lost on the Net such as
- metagoofil ; completed with the Google search: I refer you to the reference site on this subject, the site of Johnny
- LONG .
- 3 / DNS queries
- Very important to find new machines or conduct certain attacks, such requests should be addressed. The tools do not miss, here is my selection:
dnsenum;
# perl dnsenum.pl - enum-f dns.txt target
- fierce
4 / password requests are UDP and TCP can not
- can not miss this one, I mean port scan
NMAP (NASL and to please Mr. Officer;)).
In addition to conducting a scan TCP and UDP scan we will use the option-oG to deepen with the tool
AMAP. We do not forget
HTTPRINT Services WEB. To complete, we can also use SinFP approaching a different approach to provide additional results.
5 / Testing architecture The first tests used to determine various facilities
already:
routers (eg with traceroute); firewalls (filtering ICMP / UDP / TCP);
DNS servers (DNS query parameter NS); mail servers (MX DNS query parameter);
- presence of other machines (eg DNS query);
- present service discovery (e g. scan TCP and UDP)
- etc..
- To this we add the discovery of other equipment such as load-balancers (eg with the script lbd.sh
- )
- 6 / Tests WEB
Again, here is a small Selection better understand the application WEB:
Find new directories and new pages (eg list- urls.py )
Check SSL secure communications if implemented (eg openssl commands ) ;
- Check methods allowed (eg
- metoscan ) Etc.
- We can complete with classics like Nikto
- but personally I prefer Wikto that lets you do many things. Well, it is a little violent anyway;)
- This is a set of tests which should allow us to recover a lot of information about our target. Afterward, as always, you have to adapt. I think we're ready to get down to business!
Have fun!