Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Weaponising Shodan for Fun and Profit - Jeya Seelan

Weaponising Shodan for Fun and Profit - Jeya Seelan

KNOW HOW - A series of Knowledge Sharing Sessions/Webinar in the Cybersecurity Domain to educate others, spread awareness and bring out new opportunities to beginners by We Are Plymouths Chennai Team.

Ep-1:
Weaponizing Shodan For Fun and Profit - Jeya Seelan S

YouTube Talk link 🔗

https://www.youtube.com/watch?v=gg7SLlfjCZk

Slides Link 🔗

https://speakerdeck.com/jeyaseelan/weaponising-shodan-for-fun-and-profit-jeya-seelan

Jeya Seelan

June 13, 2021
Tweet

More Decks by Jeya Seelan

Other Decks in Technology

Transcript

  1. WHO AM I? Jeya Seelan Security Researcher focusing on Offensive

    Security Co-Lead At WAP Chennai Lazy Bug Hunter
  2. AGENDA SHODAN 101 DEMO TIME SEARCH QUERY FUNDAMENTALS HOW SHODAN

    WORKS? ACCESSING SHODAN SEARCH USING HASHES QUESTION TIME
  3. Shodan is a Search Engine for Internet-connected devices. Its Completely

    different from a Normal search Engines such as Google,Yahoo etc.. A Normal Web Search Engines Crawls and Indexes only the Websites.
  4. Shodan scans the whole Internet and Indexes the services and

    metadata that are publicly accessible on each and every IP address. Shodan gathers information about all devices directly connected to the Internet from small desktops up to nuclear power plants
  5. How Shodan Works? A Distributed Banner Grabber Banner grabbing is

    the art of Gathering Metadata Information about a system or a service. Here Shodan Uses large and widely distributed Banners Grabbers (aka Crawlers) that scans for all possible IP addresses and Ports. FYI : IPV4 address - 4,294,967,296 Ports - 65535
  6. How Shodan Works? Crawlers Algorithm 1. Generate a random IPv4

    address 2. Generate a random port to test from the list of ports that Shodan understands 3. Check the random IPv4 address on the random port and grab a banner 4. Goto 1
  7. How Shodan Works? Meta Data Gathering In Addition to Banner

    Grabbing Techniques Shodan also collects and indexes Meta-data about a particular IP and services. These are Hostname ASN Number Organisation Info ISP Details IP Uptime SSL Properties SSH Properties Location Details Product details HTML Details
  8. SEARCH QUERY FUNDAMENTALS Initially, When you search in Shodan it

    searches only Text not the Meta-data In order to search the meta-data there is something called as Search Filters Eg: If you search for Tesla it will search in the banner for the text not the Assets owned by Tesla
  9. SEARCH QUERY FUNDAMENTALS Filters Filters are used to narrow down

    the search results. Let's see some Filters org: shows results organization that owns the IP Ex: org:"Google Inc" inet: shows results under the given IP Range Ex: inet:69.36.132.0/24
  10. SEARCH QUERY FUNDAMENTALS os: Filters based upon Operating system Ex:

    os: Ubuntu vuln: Filters based on CVE-ID Ex: vuln: CVE- product: Filters results about a specific product http.title: Shows matching HTTP Title ssl: Searches SSL data
  11. DISCLAIMER !!! All the Upcoming Demos are for Informational and

    Educational purposes only. The author is not Responsible for any misuse of the given information.
  12. EXAMPLES PRINTERS "Serial Number:" "Built:" "Server: HP HTTP" There are

    Endless Possibilities on what you can find on shodan. As results depend upon what you search for and How you use the filters
  13. SEARCH USING HASHES Every banner contains a hash property which

    is the numeric hash. This can be utilized to search relative hosts with same hash value. Some of the commonly used methods are FAVICON HASH HTML HASH SECURITY TXT HASH
  14. FAVICON HASH A favicon, also known as a shortcut icon,

    website icon, associated with a particular website or web page. These are icons present in every sites. By calculating the hash value for this we can find more related assets.
  15. FAVICON HASH import mmh3 import requests import codecs response =

    requests.get('https://www.google.com/favicon.ico') favicon = codecs.encode(response.content,"base64") hash = mmh3.hash(favicon) print(hash) PYTHON CODE