XRay is a tool for network OSINT gathering, its goal is to make some of the initial tasks of information gathering and network mapping automatic.
How Does it Work?
XRay is a very simple tool, it works this way:
Grabbers and Collectors
Server, X-Powered-By and Location headers.robots.txt disallowed entries.title tag.version.bind. and hostname.bind. records.Notes
Shodan API Key
The shodan.io API key parameter ( -shodan-key KEY ) is optional, however if not specified, no service fingerprinting will be performed and a lot less information will be shown (basically it just gonna be DNS subdomain enumeration).
ViewDNS API Key
If a ViewDNS API key parameter ( -viewdns-key KEY ) is passed, domain historical data will also be retrieved.
Anonymity and Legal Issues
The software will rely on your main DNS resolver in order to enumerate subdomains, also, several connections might be directly established from your host to the computers of the network you’re scanning in order to grab banners from open ports.
Technically, you’re just connecting to public addresses with open ports (and there’s no port scanning involved, as such information is grabbed indirectly using Shodan API), but you know, someone might not like such behaviour.
If I were you, I’d find a way to proxify the whole process … #justsaying
Also Read – Gosec : Golang Security Checker To Inspects Source Code
Building a Docker Image
To build a Docker image with the latest version of XRay:
git clone https://github.com/evilsocket/xray.git
cd xray
docker build -t xraydocker
Once built, XRay can be started within a Docker container using the following:
docker run –rm -it -p 8080:8080 xraydocker xray -address 0.0.0.0 -shodan-key shodan_key_here -domain example.com
Manual Compilation
Make sure you are using Go >= 1.7, that your installation is working properly, that you have set the $GOPATH variable and you have appended $GOPATH/bin to your $PATH.
Then:
go get github.com/evilsocket/xray
cd $GOPATH/src/github.com/evilsocket/xray/
make
You’ll find the executable in the build folder.
Usage
Usage: xray -shodan-key YOUR_SHODAN_API_KEY -domain TARGET_DOMAIN
Options:
-address string
IP address to bind the web ui server to. (default “127.0.0.1”)
-consumers int
Number of concurrent consumers to use for subdomain enumeration. (default 16)
-domain string
Base domain to start enumeration from.
-port int
TCP port to bind the web ui server to. (default 8080)
-preserve-domain
Do not remove subdomain from the provided domain name.
-session string
Session file name. (default “-xray-session.json”)
-shodan-key string
Shodan API key.
-viewdns-key string
ViewDNS API key.
-wordlist string
Wordlist file to use for enumeration. (default “wordlists/default.lst”)
The sort command in Linux reads lines from files or standard input and writes them to standard…
The wall command in Linux sends a message to the terminals of all currently logged-in users. The…
journalctl queries logs collected by systemd-journald, the systemd logging daemon. It gives you structured access to kernel…
The stat command in Linux displays detailed metadata about files and filesystems. Where ls gives a condensed summary suitable…
In Linux, groups organize user accounts and define shared access to files and resources. Every…
The touch command in Linux does two things: it creates new empty files, and it updates the…