File size: 4,270 Bytes
d086025 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | # Output Formats
## Human-readable output (default)
```
scanme.nmap.org scanning top 1000 ports
2 open tcp ports 1 filtered port 997 closed
open
22/tcp
80/tcp
filtered
25/tcp
svc
22/tcp ssh OpenSSH 6.6.1p1 Ubuntu 2ubuntu2.13
80/tcp http Apache httpd 2.4.7
os
Linux, Ubuntu (85%)
◆ critical 80/tcp http Apache httpd 2.4.7 17 exploits
1. Apache + PHP < 5.3.12 / < 5.4.2 - cgi-bin Remote Code Execution
/opt/homebrew/opt/exploitdb/share/exploitdb/exploits/php/remote/29290.c
...
17 exploits total
```
Sections, in order:
1. **Header** — `<target> scanning top <N> ports`, where `N` is the selected port
count (`all` when scanning all 65535 ports) and the protocol matches the scan
mode: `scanning top 1000 UDP ports` with `--udp`; `--both` prints one header per
protocol (TCP first, then UDP).
2. **Summary counts** — open / filtered / closed port totals per protocol.
3. **`open`** — open ports as `<port>/<proto>` (`/tcp` or `/udp`).
4. **`filtered`** — filtered ports, same notation.
5. **`svc`** — detected service per port: `<port>/<proto> <service> <version banner>`.
6. **`os`** — inferred operating system plus a confidence percentage.
7. **Findings** — one block per risky service, prefixed with a risk marker:
`◆ critical`, `▲ high`, `● medium`, `○ low`, followed by the port, protocol,
service and exploit count; then numbered exploit entries as `<title>` and the
local Exploit-DB file path. At most 10 exploits are listed per service,
followed by an `N exploits total` line.
When NSE scripts were requested (`--script`), script results are printed
before the exploit findings.
If nothing is open, the scan ends with a `WARNING No open ports found` line.
Progress updates are printed while scanning; they are suppressed by `--json`.
## JSON output (`--json`)
A pretty-printed JSON object with three top-level keys:
| Key | Contents |
|-----|----------|
| `services` | Array, one entry per open port: `port` (number), `protocol` (`"tcp"` / `"udp"`), `service`, `product`, `version` (empty strings when undetected) |
| `os` | `null`, or `{ "name", "distro", "confidence", "source" }`; `confidence` is a number out of 100, `source` records how the guess was obtained |
| `exploits` | Array, one entry per port with exploit hits: `{ "port": <service object>, "exploits": [ … ], "risk_score": <number> }`; each exploit record is `{ "title", "url", "cvss", "path" }`, `cvss` possibly `null` |
```json
{
"services": [
{ "port": 22, "protocol": "tcp", "service": "ssh", "product": "OpenSSH",
"version": "6.6.1p1 Ubuntu 2ubuntu2.13" },
{ "port": 80, "protocol": "tcp", "service": "http", "product": "Apache httpd",
"version": "2.4.7" }
],
"os": { "name": "Linux", "distro": "Ubuntu", "confidence": 85.0, "source": "banner" },
"exploits": [
{
"port": { "port": 80, "protocol": "tcp", "service": "http",
"product": "Apache httpd", "version": "2.4.7" },
"exploits": [
{ "title": "Apache + PHP < 5.3.12 / < 5.4.2 - cgi-bin Remote Code Execution",
"url": "https://www.exploit-db.com/exploits/29290/",
"cvss": null,
"path": "/opt/homebrew/opt/exploitdb/share/exploitdb/exploits/php/remote/29290.c" }
],
"risk_score": 52.0
}
]
}
```
Typical queries:
```bash
oxscan 192.168.1.1 --json | jq '.services[] | select(.service != "") | .port'
oxscan target.example --json | jq '.exploits[].exploits[].path'
oxscan target.example --json | jq '.os.distro'
```
With `--json`, stdout carries only the JSON document: the banner line, the
open/filtered/closed summary and the coloured findings blocks are suppressed, so
read counts and risk from `services` and `exploits[].risk_score`.
## Notes
- Service and version detection runs concurrently per port, so results appear as
ports are probed; `--threads` controls the concurrency.
- OS information is derived from service banners, with an Nmap OS-detection
fallback; the percentage shown is a confidence value, not a certainty.
- Exploit rows only appear when `searchsploit` and a local Exploit-DB copy are
installed; missing tools are reported as errors instead of findings.
|