Introduction
As discussed in the lecture, internet-wide scanning services and search engines like Shodan and Censys are invaluable tools for reconnaissance. They continuously scan public IP addresses, index open ports and service banners, and provide this data through searchable web interfaces. This allows security professionals (and attackers) to identify exposed devices and services.
Access to administrative functions (e.g., SSH, HTTP management interfaces, SNMP) of network devices like routers, switches, and firewalls should be strictly controlled. However, misconfigurations or human error can lead to unintended exposure. In this lab, we will use Shodan or Censys to find potentially vulnerable devices based on specific CVE information, focusing on identifying systems through their service fingerprints rather than directly searching for CVE IDs.
Background: NVD and CVE
The National Vulnerability Database (NVD) is a comprehensive U.S. government repository of standards-based vulnerability management data. It utilizes the Common Vulnerabilities and Exposures (CVE) system, where each publicly known vulnerability is assigned a unique identifier (e.g., CVE-2023-12345).
DO NOT simply search for the CVE ID number (e.g.,
CVE-2022-1388) in Shodan or Censys. While these platforms might have *some* vulnerability data (often requiring paid accounts or specific filters like vuln:), the goal of this lab is to practice building queries based on the *characteristics* of the vulnerable systems as described in advisories. You will often need to research the CVE on NVD or vendor sites first to understand which products/versions are affected.
Setup
You will need accounts on both platforms to perform sufficient searches. Please register if you haven't already:
- Create a free account on Shodan.io.
- Create a free account on Censys Search.
Note: Free accounts have limitations on the number of searches and available filters. Use them judiciously. You may use either Shodan or Censys for each question, choosing whichever platform seems more suitable or provides results within free tier limits.
Lab Questions
Answer the following questions using Shodan or Censys. Remember to focus on building queries from the descriptions and requirements, not the CVE ID itself.
| Question # | Associated CVE | Description & Requirements | Expected Results | Shodan/Censys Query Clue |
|---|---|---|---|---|
| 1 | CVE-2022-1388 | Remote command execution vulnerability affecting F5 BIG-IP iControl REST. Find devices matching:
|
< 300 | Combine filters for country, port, and vendor/product. Try country:US port:21 product:"f5" or look for F5 related HTTP components/titles if port 21 yields nothing relevant. |
| 2 | CVE-2023-40044 | Vulnerability in WS_FTP Server versions 8.7.4 through 8.8.2. Find servers matching:
|
< 300 | Use product filter, version range filters (version:>=8.7.4 version:<=8.8.2), and country code filters (e.g., country:GB OR country:FR). |
| 3 | CVE-2022-26134 | Remote code execution vulnerability (affecting Atlassian Confluence Server and Data Center). Search all over the internet for the potentially affected product. | < 4000 | Identify the primary product associated with this CVE (Confluence) and use a product filter like product:"confluence" or search for related HTTP titles/components. |
| 4 | CVE-2023-22513 | Improper authorization vulnerability affecting Bitbucket Data Center and Server version 8.7. Search all over the internet. | < 5 | This requires a specific product and version. Use filters like product:"bitbucket" version:"8.7". |
| 5 | CVE-2016-3115 | Authenticated xauth Command Injection in OpenSSH versions prior to 7.2p1. Search all over the internet for potentially affected versions. | around 5-6m | Use a product filter and a version comparison filter: product:"openssh" version:<7.2. |
| 6 | CVE-2023-3824 | PHP vulnerability affecting versions 8.0.* before 8.0.30, 8.1.* before 8.1.22, and 8.2.* before 8.2.8. Search all over the internet. | ~500k | Construct a complex query using product, version ranges, and exclusions (-). Example segment: (version:"8.0." -version:"8.0.30"). Combine these segments with OR. |
| 7 | CVE-2021-42013 | Path traversal vulnerability affecting Apache HTTP Server versions 2.4.49 and 2.4.50. Search all over the internet. | < 4000 | Filter by product and the two specific versions using OR: product:"apache httpd" version:(2.4.49 OR 2.4.50). |
| 8 | CVE-2023-44487 | HTTP/2 Rapid Reset vulnerability (affects many web servers). Search all over the internet, but with specific requirements:
|
< 100 | This CVE is protocol-level, harder to filter directly. Focus on the given requirement: use the hostname: filter with the required substring. Example: hostname:northeastern. |
| 9 | CVE-2022-30780 | Vulnerability in Lighttpd versions 1.4.56 through 1.4.58. Search all over the internet with matching requirements:
|
< 3000 | Combine product, version range, and port filters. Focus on Lighttpd on port 80: product:"lighttpd" version:>=1.4.56 version:<=1.4.58 port:80. |
| 10 | CVE-2023-38166 | Layer 2 Tunneling Protocol (L2TP) Remote Code Execution. Find systems potentially running vulnerable services (often web admin interfaces on network gear) with matching requirements:
|
< 3000 | Combine multiple filters: country:US port:443 product:apache os:ubuntu. This identifies the specified stack, which might host the vulnerable L2TP service interface. |
| 11 | CVE-2020-11984 | Apache HTTP Server vulnerability (mod_proxy related) affecting versions 2.4.32 to 2.4.43. Search all over the internet. | < 200 | Use product filter and version range. You might try adding an HTTP module filter if Shodan indexes it: product:"apache httpd" version:>=2.4.32 version:<=2.4.43 http.module:mod_proxy (module filter may or may not work). |
| 12 | CVE-2021-28041 | OpenSSH vulnerability (related to FIDO devices). Find systems running OpenSSH 8.2 with matching requirements:
|
< 100 | Combine product/version, include specific networks using net: (comma-separated), and exclude the university block using -net:. Example: product:"openssh" version:"8.2" net:130.10.0.0/13,165.33.0.0/19 -net:130.15.0.0/16 (replace placeholder exclusion). |
Reporting Requirements
Answer the following and include them in your report:
- Submit your assigned question numbers.
- For each assigned question, provide:
- The exact search string(s) you used in Shodan or Censys.
- The number of results obtained for your final query.
- Explain the methodology you followed for each assigned question. Describe how you interpreted the CVE information and requirements to construct your search query (e.g., "Researched CVE-XXXX-YYYY on NVD, found it affected Product Z version A.B.C, then used Shodan filter `product:Z version:A.B.C` combined with the required `country:` filter").