Skip to content

Commit c725381

Browse files
authored
Merge pull request #72 from codingo/codingo-broken-setup
Fix broken setup (Closes #55, changes since #67)
2 parents e1ef658 + f7c4041 commit c725381

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1925
-2
lines changed

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
recursive-include Reconnoitre *.txt
2+
recursive-include Reconnoitre *.json

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ Contributions are more than welcome!
99

1010
This tool is based heavily upon the work made public in Mike Czumak's (T_v3rn1x) OSCP review ([link](https://www.securitysift.com/offsec-pwb-oscp/)) along with considerable influence and code taken from Re4son's mix-recon ([link](https://whitedome.com.au/re4son/category/re4son/oscpnotes/)). Virtual host scanning is originally adapted from teknogeek's work which is heavily influenced by jobertabma's virtual host discovery script ([link](https://github.com/jobertabma/virtual-host-discovery)). Further Virtual Host scanning code has been adapted from a project by Tim Kent and I, available here ([link](https://github.com/codingo/VHostScan)).
1111

12+
# Installation
13+
To install Reconnoitre first make a local copy of the repository by performing the following where you wish it to be located:
14+
15+
```
16+
git clone https://github.com/codingo/Reconnoitre.git
17+
```
18+
After you have done this run setup.py with the following:
19+
```
20+
python setup.py install
21+
```
22+
23+
After setup has run Reconnoitre will now be in your path (as reconnoitre) and you can launch it anywhere using:
24+
```
25+
reconnoitre <args>
26+
```
27+
1228
# Usage
1329

1430
This tool can be used and copied for personal use freely however attribution and credit should be offered to Mike Czumak who originally started the process of automating this work.

Reconnoitre.egg-info/PKG-INFO

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
Metadata-Version: 1.0
2+
Name: Reconnoitre
3+
Version: 1.0
4+
Summary: A reconnaissance tool made for the OSCP labs to automate information gathering, and service enumeration whilst creating a directory structure to store results,findings and exploits used for each host, recommended commands to execute and directory structures for storing loot and flags.
5+
Home-page: https://github.com/codingo/Reconnoitre
6+
Author: codingo
7+
Author-email: [email protected]
8+
License: GPLv3
9+
Description-Content-Type: UNKNOWN
10+
Description: ![Reconnnoitre](https://github.com/codingo/Reconnoitre/blob/master/assets/tank-152362_640.png)
11+
A reconnaissance tool made for the OSCP labs to automate information gathering and service enumeration whilst creating a directory structure to store results, findings and exploits used for each host, recommended commands to execute and directory structures for storing loot and flags.
12+
13+
Contributions are more than welcome!
14+
15+
[![Python 3.2|3.6](https://img.shields.io/badge/python-3.2|3.6-green.svg)](https://www.python.org/) [![License](https://img.shields.io/badge/license-GPL3-_red.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) [![Build Status](https://travis-ci.org/codingo/Reconnoitre.svg?branch=master)](https://travis-ci.org/codingo/Reconnoitre) [![Twitter](https://img.shields.io/badge/twitter-@codingo__-blue.svg)](https://twitter.com/codingo_)
16+
17+
# Credit
18+
19+
This tool is based heavily upon the work made public in Mike Czumak's (T_v3rn1x) OSCP review ([link](https://www.securitysift.com/offsec-pwb-oscp/)) along with considerable influence and code taken from Re4son's mix-recon ([link](https://whitedome.com.au/re4son/category/re4son/oscpnotes/)). Virtual host scanning is originally adapted from teknogeek's work which is heavily influenced by jobertabma's virtual host discovery script ([link](https://github.com/jobertabma/virtual-host-discovery)). Further Virtual Host scanning code has been adapted from a project by Tim Kent and I, available here ([link](https://github.com/codingo/VHostScan)).
20+
21+
# Usage
22+
23+
This tool can be used and copied for personal use freely however attribution and credit should be offered to Mike Czumak who originally started the process of automating this work.
24+
25+
| Argument | Description |
26+
| ------------- |:-------------|
27+
| -h, --help | Display help message and exit |
28+
| -t TARGET_HOSTS | Set either a target range of addresses or a single host to target. May also be a file containing hosts. |
29+
| -o OUTPUT_DIRECTORY | Set the target directory where results should be written. |
30+
| -w WORDLIST | Optionally specify your own wordlist to use for pre-compiled commands, or executed attacks. |
31+
| --pingsweep | Write a new target.txt file in the OUTPUT_DIRECTORY by performing a ping sweep and discovering live hosts. |
32+
| --dns, --dnssweep | Find DNS servers from the list of target(s). |
33+
| --snmp | Find hosts responding to SNMP requests from the list of target(s). |
34+
| --services | Perform a service scan over the target(s) and write recommendations for further commands to execute. |
35+
| --hostnames | Attempt to discover target hostnames and write to hostnames.txt. |
36+
| --virtualhosts | Attempt to discover virtual hosts using the specified wordlist. This can be expended via discovered hostnames. |
37+
| --ignore-http-codes | Comma separated list of http codes to ignore with virtual host scans. |
38+
| --ignore-content-length | Ignore content lengths of specificed amount. This may become useful when a server returns a static page on every virtual host guess. |
39+
| --quiet | Supress banner and headers and limit feedback to grepable results. |
40+
| --quick | Move to the next target after performing a quick scan and writing first-round recommendations. |
41+
| --no-udp | Disable UDP service scanning, which is ON by default. |
42+
43+
## Usage Examples
44+
_Note that these are some examples to give you insight into potential use cases for this tool. Command lines can be added or removed based on what you wish to accomplish with your scan._
45+
46+
### Scan a single host, create a file structure and discover services
47+
```
48+
python ./reconnoitre.py -t 192.168.1.5 -o /root/Documents/labs/ --services
49+
```
50+
51+
An example output would look like:
52+
53+
```
54+
root@kali:~/Documents/tools/reconnoitre/reconnoitre# python ./reconnoitre.py -t 192.168.1.5 --services -o /root/Documents/labs/
55+
__
56+
|"""\-= RECONNOITRE
57+
(____) An OSCP scanner
58+
59+
[#] Performing service scans
60+
[*] Loaded single target: 192.168.1.5
61+
[+] Creating directory structure for 192.168.1.5
62+
[>] Creating scans directory at: /root/Documents/labs/192.168.1.5/scans
63+
[>] Creating exploit directory at: /root/Documents/labs/192.168.1.5/exploit
64+
[>] Creating loot directory at: /root/Documents/labs/192.168.1.5/loot
65+
[>] Creating proof file at: /root/Documents/labs/192.168.1.5/proof.txt
66+
[+] Starting quick nmap scan for 192.168.1.5
67+
[+] Writing findings for 192.168.1.5
68+
[>] Found HTTP service on 192.168.1.5:80
69+
[>] Found MS SMB service on 192.168.1.5:445
70+
[>] Found RDP service on 192.168.1.5:3389
71+
[*] TCP quick scan completed for 192.168.1.5
72+
[+] Starting detailed TCP/UDP nmap scans for 192.168.1.5
73+
[+] Writing findings for 192.168.1.5
74+
[>] Found MS SMB service on 192.168.1.5:445
75+
[>] Found RDP service on 192.168.1.5:3389
76+
[>] Found HTTP service on 192.168.1.5:80
77+
[*] TCP/UDP Nmap scans completed for 192.168.1.5
78+
```
79+
Which would also write the following recommendations file in the scans folder for each target:
80+
```
81+
[*] Found HTTP service on 192.168.1.50:80
82+
[>] Use nikto & dirb / dirbuster for service enumeration, e.g
83+
[=] nikto -h 192.168.1.50 -p 80 > /root/Documents/labs/192.168.1.50/scans/192.168.1.50_nikto.txt
84+
[=] dirb http://192.168.1.50:80/ -o /root/Documents/labs/192.168.1.50/scans/192.168.1.50_dirb.txt -r -S -x ./dirb-extensions/php.ext
85+
[=] java -jar /usr/share/dirbuster/DirBuster-1.0-RC1.jar -H -l /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt -r /root/Documents/labs/192.168.1.50/scans/192.168.1.50_dirbuster.txt -u http://192.168.1.50:80/
86+
[=] gobuster -w /usr/share/seclists/Discovery/Web_Content/common.txt -u http://192.168.1.50:80/ -s '200,204,301,302,307,403,500' -e > /root/Documents/labs/192.168.1.50/scans/192.168.1.50_gobuster_common.txt -t 50
87+
[=] gobuster -w /usr/share/seclists/Discovery/Web_Content/cgis.txt -u http://192.168.1.50:80/ -s '200,204,301,307,403,500' -e > /root/Documents/labs/192.168.1.50/scans/192.168.1.50_gobuster_cgis.txt -t 50
88+
[>] Use curl to retreive web headers and find host information, e.g
89+
[=] curl -i 192.168.1.50
90+
[=] curl -i 192.168.1.50/robots.txt -s | html2text
91+
[*] Found MS SMB service on 192.168.1.5:445
92+
[>] Use nmap scripts or enum4linux for further enumeration, e.g
93+
[=] nmap -sV -Pn -vv -p445 --script="smb-* -oN '/root/Documents/labs/192.168.1.5/nmap/192.168.1.5_smb.nmap' -oX '/root/Documents/labs/192.168.1.5/scans/192.168.1.5_smb_nmap_scan_import.xml' 192.168.1.5
94+
[=] enum4linux 192.168.1.5
95+
[*] Found RDP service on 192.168.1.5:3389
96+
[>] Use ncrackpassword cracking, e.g
97+
[=] ncrack -vv --user administrator -P /root/rockyou.txt rdp://192.168.1.5
98+
```
99+
### Discover live hosts and hostnames within a range
100+
```
101+
python ./reconnoitre.py -t 192.168.1.1-252 -o /root/Documents/testing/ --pingsweep --hostnames
102+
```
103+
104+
### Discover live hosts within a range and then do a quick probe for services
105+
```
106+
python ./reconnoitre.py -t 192.168.1.1-252 -o /root/Documents/testing/ --pingsweep --services --quick
107+
```
108+
This will scan all services within a target range to create a file structure of live hosts as well as write recommendations for other commands to be executed based on the services discovered on these machines. Removing --quick will do a further probe but will greatly lengthen execution times.
109+
110+
### Discover live hosts within a range and then do probe all ports (UDP and TCP) for services
111+
```
112+
python ./reconnoitre.py -t 192.168.1.1-252 -o /root/Documents/testing/ --pingsweep --services
113+
```
114+
115+
# Requirements
116+
117+
This bare requirement for host and service scanning for this tool is to have both `nbtscan` and `nmap` installed. If you are not using host scanning and only wish to perform a ping sweep and service scan you can get away with only installing `nmap`. The outputted _findings.txt_ will often recommend additional tools which you may not have available in your distribution if not using Kali Linux. All requirements and recommendations are native to Kali Linux which is the recommended (although not required) distribution for using this tool.
118+
119+
In addition to these requirements outputs will often refer to Wordlists that you may need to find. If you are undertaking OSCP these can be found in the "List of Recommended Tools" thread by g0tmilk. If not then you can find the majority of these online or already within a Kali Linux installation.
120+
121+
Platform: UNKNOWN

Reconnoitre.egg-info/SOURCES.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
MANIFEST.in
2+
README.md
3+
setup.py
4+
Reconnoitre/__init__.py
5+
Reconnoitre/reconnoitre.py
6+
Reconnoitre.egg-info/PKG-INFO
7+
Reconnoitre.egg-info/SOURCES.txt
8+
Reconnoitre.egg-info/dependency_links.txt
9+
Reconnoitre.egg-info/entry_points.txt
10+
Reconnoitre.egg-info/top_level.txt
11+
Reconnoitre/lib/__init__.py
12+
Reconnoitre/lib/config.json
13+
Reconnoitre/lib/file_helper.py
14+
Reconnoitre/lib/find_dns.py
15+
Reconnoitre/lib/hostname_scan.py
16+
Reconnoitre/lib/ping_sweeper.py
17+
Reconnoitre/lib/service_scan.py
18+
Reconnoitre/lib/snmp_walk.py
19+
Reconnoitre/lib/virtual_host_scanner.py
20+
Reconnoitre/lib/core/__init__.py
21+
Reconnoitre/lib/core/__version__.py
22+
Reconnoitre/lib/core/input.py
23+
Reconnoitre/wordlists/virtual-host-scanning.txt
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Reconnoitre.egg-info/entry_points.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[console_scripts]
2+
reconnoitre = Reconnoitre.reconnoitre:main
3+

Reconnoitre.egg-info/top_level.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Reconnoitre
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)