|
2 | 2 |
|
3 | 3 | <!---->
|
4 | 4 | <!---->
|
5 |
| -<img alt="Screenshot 2024-02-09 at 7 05 14 PM" src="https://github.com/anmolksachan/ThreatTracer/assets/60771253/1be90c9e-ac0a-4038-b0f5-7aa4e5cde29f"> |
6 |
| - |
7 |
| - |
8 |
| -This script fetches CVE details for a given component and version by identifying relevant CPEs, and searches for public exploits for relevant CVEs. |
9 |
| - |
10 |
| -## Usage |
11 |
| - |
12 |
| -1. Make sure you have Python3 installed on your system. |
13 |
| -2. Install required libraries using `pip3 install -r requirements.txt`. |
14 |
| -3. Run the script using `python3 threattracer.py`. |
15 |
| - |
16 |
| -## Script Description |
17 |
| - |
18 |
| -This script uses the National Vulnerability Database (NVD) API to fetch Common Vulnerabilities and Exposures (CVE) details for a specified component and version. |
19 |
| - |
20 |
| -## Features |
21 |
| -1. CVE Finder Script: This script is designed to identify Common Vulnerabilities and Exposures (CVEs) based on the name and version of a component. |
22 |
| -2. User-friendly Interaction: The script interacts with users to input the name and version of a software component, making it easy to search for CVEs. |
23 |
| -3. Web Scraping: The script utilizes web scraping techniques to fetch Common Platform Enumeration (CPE) information from NIST's National Vulnerability Database (NVD). |
24 |
| -4. Colorful Output: Output messages are color-coded using the termcolor library to enhance readability and provide a visually appealing experience. |
25 |
| -5. CPE Search: The script searches for all matching CPEs for the specified component and version, displaying the URLs used for CPE retrieval. |
26 |
| -6. CVE Querying: It then queries the NVD API using the CPE information to fetch CVE details for each CPE found. |
27 |
| -7. Detailed Information: The script displays detailed information about each CVE, including the CVE ID, description, weaknesses, and link to the NVD page. |
28 |
| -8. Robust Error Handling: The script handles cases where CPEs are not found, providing appropriate error messages to users. |
29 |
| -9. Easy-to-Use: The user interface is designed to be straightforward, allowing users to quickly search for CVEs associated with a specific software version. |
30 |
| -10. CPEs Enumeration: When multiple CPEs are found, the script lists all the discovered CPEs before proceeding to query CVE details for each one. |
31 |
| -11. Reusability: The modular structure of the script makes it reusable and easy to integrate into other projects or scripts. |
32 |
| -12. Interactive Prompt: The script employs an interactive prompt to guide users through the process of entering the software component and version. |
33 |
| -13. Automated Querying: The script automates the process of querying and fetching CVE details, saving users time and effort. |
34 |
| -14. API Integration: It leverages the NVD API to retrieve and present accurate CVE information for the specified software version. |
35 |
| -15. Store results in text: Store the results in a nice formatted way [In first version, not supported any more] |
36 |
| -16. Add every CVE public exploit via `pyExploitDb` feature by [@meppohak5](https://github.com/meppohak5) |
37 |
| -17. The v2.1 release of the code optimizes the previous version by incorporating asynchronous HTTP requests using the aiohttp library, faster response time. |
38 |
| -18. https://poc-in-github.motikan2010.net -> Github POC lookup support. |
39 |
| -19. Reverse search for public exploits/ 0-Days over `packetstormsecurity` |
40 |
| -20. <b>Search for all possible exploits/ 0Days.</b> |
41 |
| - |
42 |
| -### Prerequisites |
43 |
| - |
44 |
| -- Python (3.6+ recommended) |
45 |
| -- `requests` library (`pip3 install requests`) |
46 |
| -- `termcolor` library (`pip3 install termcolor`) |
47 |
| -- `pyExploitDb` library (`pip3 install pyExploitDb==1.0.0`) |
48 |
| -- `aiohttp` library (`pip3 install aiohttp`) |
49 |
| - |
50 |
| -### Execution |
51 |
| - |
52 |
| -1. Run the script. |
53 |
| -2. Enter the component (e.g., `jquery`). |
54 |
| -3. Enter the version (e.g., `1.0.0`). |
55 |
| - |
56 |
| -The script will display relevant CVE information, if available. |
57 |
| - |
58 |
| -## Script Example |
59 |
| -  |
60 |
| - |
61 |
| -  |
62 |
| - |
63 |
| -## Sample Run |
64 |
| -<!----> |
65 |
| - |
66 |
| - |
67 |
| -## Public Exploit |
68 |
| -https://github.com/anmolksachan/ThreatTracer/assets/60771253/dc7d1cb0-e759-4a12-842e-a2bb42dda14c |
69 |
| -<!--https://github.com/anmolksachan/ThreatTracer/assets/60771253/ae20bc09-1f19-4eaf-af09-ff930eb6b10f--> |
70 |
| - |
71 |
| -## Packet Storm security lookup |
72 |
| - |
73 |
| -<br>Sometimes the vulnerability doesn't have CVE associated yet and it is possible that a public exploit is available. |
| 5 | +<!--<img alt="Screenshot 2024-02-09 at 7 05 14 PM" src="https://github.com/anmolksachan/ThreatTracer/assets/60771253/1be90c9e-ac0a-4038-b0f5-7aa4e5cde29f">--> |
| 6 | + |
| 7 | + |
| 8 | +> Find CVEs, public exploits, and 0-Day vulnerabilities for any software component. |
| 9 | +
|
| 10 | +## Key Features ✨ |
| 11 | +- 🔍 **Multi-mode Search**: Lookup by: |
| 12 | + - Component & Version (`-c apache -v 2.4`) |
| 13 | + - Direct CPE (`--cpe cpe:2.3:a:apache:http_server:2.4`) |
| 14 | + - Specific CVE (`--cve CVE-2021-44228`) |
| 15 | +- 🚀 **NVD API Integration** with API key support for faster queries |
| 16 | +- 📦 **Trickest PoC Database** integration for GitHub exploit lookup |
| 17 | +- 📬 **Marc Full Disclosure** exploit search integration |
| 18 | +- 🛡️ **Exploit-DB** verification via pyExploitDb |
| 19 | +- ⚡ **Rate limiting** with automatic retry system |
| 20 | +- 🔐 **API Key Management** with persistent storage |
| 21 | +- 📊 **Detailed Output** with color-coded results |
| 22 | + |
| 23 | +## Installation 🛠️ |
| 24 | +```bash |
| 25 | +git clone https://github.com/anmolksachan/ThreatTracer.git |
| 26 | +``` |
| 27 | +```bash |
| 28 | +cd ThreatTracer |
| 29 | +``` |
| 30 | +```bash |
| 31 | +pip3 install -r requirements.txt |
| 32 | +``` |
| 33 | +```bash |
| 34 | +python3 threattracer.py -h |
| 35 | +``` |
| 36 | + |
| 37 | +## Configure ⚙️ |
| 38 | +```bash |
| 39 | +$ sudo python3 threattracer.py --apiStore <API KEY> -c 'Peel Shopping' -v '9.3.0' |
| 40 | +API key stored in /root/.cve_finder.cfg |
| 41 | +``` |
| 42 | + |
| 43 | +## Usage 🚀 |
| 44 | +```bash |
| 45 | +python3 threattracer.py --help |
| 46 | + |
| 47 | +# Basic usage |
| 48 | +python3 threattracer.py -c "Apache" -v "2.4.56" |
| 49 | + |
| 50 | +# Advanced options |
| 51 | +python3 threattracer.py -c 'Peel Shopping' -v '9.3.0' --poc --more |
| 52 | +python3 threattracer.py --cpe "cpe:2.3:a:peel:peel_shopping:9.4.0" |
| 53 | +python3 threattracer.py --cve CVE-2021-27190 |
| 54 | +``` |
| 55 | + |
| 56 | +## Examples 📌 |
| 57 | +```bash |
| 58 | +# Component search with PoC lookup |
| 59 | +python3 threattracer.py -c 'PEEL SHOPPING' -v "9.4.0" --poc |
| 60 | + |
| 61 | +# Direct CVE analysis |
| 62 | +python3 threattracer.py --cve CVE-2021-27190 |
| 63 | + |
| 64 | +# Store API key for repeated use |
| 65 | +python3 threattracer.py --apiStore YOUR_API_KEY_HERE |
| 66 | +``` |
| 67 | + |
| 68 | +## Sample Run 📟/ Output Preview 🖥️ |
| 69 | +- Help |
| 70 | + |
| 71 | + |
| 72 | +- Configure NIST API Key to avoid getting rate limited [Recommended] |
| 73 | + |
| 74 | + |
| 75 | +- Lookup for component and version |
| 76 | + |
| 77 | + |
| 78 | +- Lookup for component and version with --more to get detailed description of each CVE and --poc to lookup for POCs/ Exploits. |
| 79 | + |
| 80 | + |
| 81 | +- Direct CVE lookup |
| 82 | + |
| 83 | + |
| 84 | +- Direct CPE lookup |
| 85 | + |
| 86 | + |
| 87 | +- Not interested in configuring API, directly use from the threattracer |
| 88 | + |
| 89 | + |
| 90 | +- Force threattracer to not use NIST API even if its configured in environment |
| 91 | + |
| 92 | + |
| 93 | +## Features Breakdown 💡 |
| 94 | + |
| 95 | + 1. CVE Detection via NVD API |
| 96 | + 2. Exploit Verification through: |
| 97 | + - Exploit-DB |
| 98 | + - GitHub PoC database |
| 99 | + - Marc Full Disclosure |
| 100 | + |
| 101 | + 3. Zero-Day Hunting capabilities |
| 102 | + 4. Rate Limit Handling with automatic retries |
| 103 | + 5. Persistent API Key storage |
| 104 | + |
| 105 | +## Requirements 📋 |
| 106 | + |
| 107 | + Python 3.8+ |
| 108 | + requests |
| 109 | + beautifulsoup4 |
| 110 | + pyExploitDb |
| 111 | + termcolor |
| 112 | + |
| 113 | +### Contributors 🤝 |
| 114 | +[@0xCaretaker](https://github.com/0xCaretaker) <br> |
| 115 | +[@meppohak5](https://github.com/meppohak5) <br> |
| 116 | +Contribute to be mentioned here. |
74 | 117 |
|
75 |
| -## Github Exploit/ POC reverse lookup |
76 |
| - |
| 118 | +### Note |
| 119 | +Feel free to enhance, modify, or contribute to this script to suit your needs and explore more security-related projects! |
77 | 120 |
|
78 |
| -## Fetch all possible exploit/ 0-Days out there |
79 |
| - |
| 121 | +## Support ❤️ |
80 | 122 |
|
81 |
| -## POC |
82 |
| -[Vimeo](https://vimeo.com/864312552) |
| 123 | + ⭐ Star this repository |
| 124 | + 📣 Follow [@FR13ND0x7F](https://twitter.com/fr13nd0x7f) |
| 125 | + 🤝 Contribute through pull requests |
83 | 126 |
|
84 |
| -### Contact |
85 |
| -Shoot my DM : [@FR13ND0x7F](https://twitter.com/fr13nd0x7f) |
| 127 | +## Disclaimer ⚠️ |
86 | 128 |
|
87 |
| -### Special Thanks |
88 |
| -[@FR13ND0x7F](https://twitter.com/fr13nd0x7f) |
89 |
| -[@0xCaretaker](https://github.com/0xCaretaker) |
90 |
| -[@meppohak5](https://github.com/meppohak5) |
91 |
| -Contribute to be mentioned here. |
| 129 | +This tool is for educational and ethical security testing purposes only. Use only on systems you own or have explicit permission to test. |
92 | 130 |
|
93 |
| -### Note |
94 |
| -Feel free to enhance, modify, or contribute to this script to suit your needs and explore more security-related projects! |
| 131 | +## License 📜 |
95 | 132 |
|
96 |
| -## __Want to support my work?__ |
97 |
| -Give me a Star in the repository or follow me [@FR13ND0x7F](https://twitter.com/fr13nd0x7f) , thats enough for me :P |
| 133 | +[MIT License](https://github.com/anmolksachan/ThreatTracer?tab=MIT-1-ov-file#readme) - Copyright (c) 2024 Anmol Sachan |
0 commit comments