Using Search Engines as Penetration Testing Tools

Research engines are a treasure trove of beneficial delicate information, which hackers can use for their cyber-attacks. Excellent information: so can penetration testers. 

From a penetration tester’s point of watch, all search engines can be largely divided into pen test-particular and typically-used. The post will deal with three research engines that my counterparts and I extensively use as penetration testing resources. These are Google (the frequently-utilised) and two pen examination-specific ones: Shodan and Censys.

Google
Penetration testing engineers use Google superior search operators for Google dork queries (or merely Google dorks). These are search strings with the following syntax: operator:look for phrase. Even further, you will discover the checklist of the most valuable operators for pen testers:

  • cache: gives entry to cached webpages. If a pen tester is searching for a selected login web page and it is cached, the specialist can use cache: operator to steal consumer credentials with a internet proxy.
  • filetype: limitations the search result to certain file kinds. 
  • allintitle: and intitle: both offer with HTML site titles. allintitle: finds pages that have all of the look for terms in the website page title. intitle: restricts effects to people containing at least some of the lookup terms in the website page title. The remaining terms should appear someplace in the overall body of the site.
  • allinurl: and inurl: apply the exact principle to the website page URL. 
  • web page: returns final results from a web-site positioned on a specified area. 
  • linked: lets discovering other internet pages related in linkage patterns to the offered URL. 

What can be uncovered with Google state-of-the-art look for operators?
Google sophisticated research operators are made use of along with other penetration screening resources for nameless details collecting, community mapping, as well as port scanning and enumeration. Google dorks can give a pen tester with a huge array of sensitive information and facts, this kind of as admin login webpages, usernames and passwords, delicate documents, armed forces or government data, corporate mailing lists, financial institution account aspects, etc. 

Shodan
Shodan is a pen check-precise look for motor that can help a penetration tester to find unique nodes (routers, switches, desktops, servers, etcetera.). The lookup motor interrogates ports, grabs the ensuing banners and indexes them to obtain the needed information. The value of Shodan as a penetration screening device is that it gives a number of easy filters:

  • state: narrows the lookup by a two-letter state code. For instance, the ask for apache country:NO will clearly show you apache servers in Norway.
  • hostname: filters final results by any part of a hostname or a domain title. For case in point, apache hostname:.org finds apache servers in the .org domain.
  • net: filters results by a unique IP assortment or subnet.
  • os: finds specified running systems.
  • port: queries for particular expert services. Shodan has a constrained selection of ports: 21 (FTP), 22 (SSH), 23 (Telnet) and 80 (HTTP). Even so, you can deliver a ask for to the search engine’s developer John Matherly by way of Twitter for far more ports and products and services.

Shodan is a professional venture and, whilst authorization is not necessary, logged-in end users have privileges. For a monthly payment you are going to get an extended amount of query credits, the skill to use state: and web: filters, help save and share lookups, as perfectly as export success in XML structure. 

Censys
One more beneficial penetration testing software is Censys – a pen examination-distinct open up-supply research engine. Its creators declare that the engine encapsulates a “complete database of almost everything on the Net.” Censys scans the world wide web and gives a pen tester with 3 details sets of hosts on the general public IPv4 address area, sites in the Alexa top million domains and X.509 cryptographic certificates.

Censys supports a total textual content search (For example, certificate has expired question will deliver a pen tester with a checklist of all gadgets with expired certificates.) and normal expressions (For illustration, metadata. Manufacturer: “Cisco” query demonstrates all energetic Cisco equipment. Heaps of them will definitely have unpatched routers with acknowledged vulnerabilities.). A much more in depth description of the Censys look for syntax is supplied in this article.

Shodan vs. Censys
As penetration screening instruments, both of those research engines are used to scan the world-wide-web for susceptible devices. Nonetheless, I see the variation between them in the utilization plan and the presentation of search effects.

 
Shodan does not need any evidence of a user’s noble intentions, but a person should spend to use it. At the exact same time, Censys is open up-resource, but it demands a CEH certificate or other document proving the ethics of a user’s intentions to elevate substantial use limitations (access to supplemental features, a query restrict (5 for every day) from one IP handle). 

Shodan and Censys current look for final results in another way. Shodan does it in a much more handy for consumers form (resembles Google SERP), Censys – as uncooked info or in JSON format. The latter is more ideal for parsers, which then current the details in a extra readable sort.

Some safety researchers declare that Censys provides much better IPv4 tackle room protection and fresher results. But, Shodan performs a way much more comprehensive world-wide-web scanning and provides cleaner final results. 

So, which 1 to use? To my intellect, if you want some modern stats – select Censys. For each day pen screening needs – Shodan is the proper decide on.

On a ultimate observe
Google, Shodan and Censys are very well worth including to your penetration testing tool arsenal. I endorse using all the a few, as each and every contributes its component to a comprehensive details collecting.


Licensed Ethical Hacker at ScienceSoft with 5 years of knowledge in penetration tests. Uladzislau’s spheres of competence incorporate reverse engineering, black box, white box and grey box penetration tests of world-wide-web and cellular applications, bug searching and exploration function in the place of data stability.