Hack TOR OnionScan Guide
Hack TOR OnionScan Guide
Hack TOR OnionScan Guide
Installing
A Note on Dependencies
go install github.com/s-rah/onionscan
$GOPATH/bin/onionscan.
Alternatively, you can just do go run
github.com/s-rah/onionscan.go
Quick Start
For a simple report detailing the high,
medium and low risk areas found with a
hidden service:
onionscan notarealhiddenservice.onion
onionscan --verbose
notarealhiddenservice.onion
onionscan --jsonReport
notarealhiddenservice.onion
If you would like to use a proxy server
listening on something other that
127.0.0.1:9050, then you can use the
--torProxyAddress flag:
onionscan
--torProxyAddress=127.0.0.1:9150
notarealhiddenservice.onion
Web sites
When OnionScan detects a web server, it
is scanned for the issues described in this
section.
Apache mod_status
Leak
This should not be news, you should not
have it enabled. If you do have it enabled,
attacks can:
Open Directories
Basic web security 101, if you leave
directories open then people are going to
scan them, and find interesting things -
old versions of images, temp files etc.
EXIF Tags
Whether you create them yourself or allow
users to upload images, you need to
ensure the metadata associated with the
image is stripped.
Server Fingerprint
Sometimes, even without mod_status we
can determine if two sites are hosted on
the same infrastructure. We can use the
following attributes to make this
distinction:
Analytics IDs
Some onion services use 3rd party
analytics providers to track usage of their
site. These providers often require a
unique code to be embedded within the
site - this code can be used to determine if
two sites share a common operator or to
find clearnet sites using the same code.
PGP Identities
OnionScan extracts PGP identities from
webpages in order to grab identifiers like
email address / identities & GPG versions.
SSH
OnionScan collected information about
SSH endpoints including software versions
and the SSH public key fingerprint. These
can be correlated against other onion
services or clearnet servers in order to try
and identifier the actual sever location.
Cryptocurrency
Clients
OnionScan scans for common
cryptocurrency clients including Bitcoin
and Litecoin.
Crawl configuration
Providing crawl configuration
Configuration
structure
{
"onion":
"aabbccddeeffgghh.onion",
"base": "/forums",
"exclude": [
"/profile",
"/settings"
],
"relationships":[
{
"name":"User",
"triggeridentifierregex":"inde
x\\.php\\?action=profile;u=([0-9]*)",
"extrarelationships":[
{
"name":"Name",
"regex":"<div
class=\"username\"><h4>(.*) <span
class=\"position\">"
},
{
"name":"Position",
"regex":"<span
class=\"position\">(.*)</span></h4>"
}
]
},
{
"name":"Post",
"triggeridentifierregex":"inde
x\\.php\\?topic=([0-9]*)",
"extrarelationships":[
{
"name":"Topic",
"regex":"Topic: (.*)
\\(Read"
}
]
}
]
}