01 Preparing and Defending Against Reconnaissance and Information Gathering
01 Preparing and Defending Against Reconnaissance and Information Gathering
Reconnaissance / Information
Gathering: Definition
Reconnaissance
Techniques & Defense
https://www.optiv.com/blog/war-dialing-part-1-the-voip-and-analog-primer
https://kismac-ng.org/what-is-wardriving/ IHRPv1 - Caendra Inc. © 2019 | p.12
1.2.1 Whois information analysis
Notes:
1. Instead of the cache functionality of search engines,
attackers are also known to use http://web.archive.org/
2. Some of the directives that you saw on the Google
hacking resource also apply on other search engines
3. Automated penetration testing tools that leverage
search engines for reconnaissance are: Recon-ng and
SearchDiggity
https://bitbucket.org/LaNMaSteR53/recon-ng
https://www.bishopfox.com/resources/tools/google-hacking-diggity/attack-tools/
IHRPv1 - Caendra Inc. © 2019 | p.27
1.2.3 Utilization of search engines, internet-wide scanners
& other sites
• Configure the primary DNS server so that it accepts zone requests by secondary
and tertiary DNS servers only
• Use split DNS
• Thoroughly harden every DNS server
• Proactively attempt a zone transfer
o dig @[DNS_server_IP] [target_domain] –t AXFR
o nslookup
> server [authoritative_server_IP_or_name]
> set type=any
> ls –d [target_domain]
IHRPv1 - Caendra Inc. © 2019 | p.36
1.2.4 DNS interrogation
>> Invoke-DomainHarvestOWA
–ExchHostname mail.domain.com –OutFile
potential_domains.txt –CompanyName
"Target Name"
Note:
A similar inconsistency can be met if someone compares the
response times of an OWA request with the correct domain name
and a non-existing username and an OWA request with the
correct domain name and an existing username.
Examples:
• /Autodiscover/Autodiscover.xml
• /EWS/Exchange.asmx
Specifically,
https://github.com/beefproject/beef/wiki/Information-Gathering
contains exactly how BeEF utilizes JavaScript code to perform
information gathering / reconnaissance.
If you take a quick look at it, you will notice the below.
Undoubtedly we are dealing with malicious JavaScript code that is related to crypto-mining.
war dialing
https://www.optiv.com/blog/war-dialing-part-1-the-voip-and-analog-primer
war driving
https://kismac-ng.org/what-is-wardriving/
ICANN WHOIS
https://whois.icann.org/en
Certificate Transparency
https://www.certificate-transparency.org/
Censys
https://censys.io/certificates?q=
Remove URLs Tool: Temporarily Block Search Results from Sites that you
Own
https://support.google.com/webmasters/answer/1663419?hl=en
Internet Archive
http://web.archive.org/
Recon-ng
https://bitbucket.org/LaNMaSteR53/recon-ng
Shodan
https://www.shodan.io/
NTLM
https://docs.microsoft.com/en-us/windows/desktop/secauthn/microsoft-ntlm