Xray
Xray adalah sebuah alat yang digunakan oleh para peneliti keamanan siber untuk menemukan kerentanan pada aplikasi web dan infrastruktur jaringan. Alat ini bekerja dengan cara secara otomatis melakukan berbagai jenis scan dan pengujian terhadap target yang ditentukan. Beberapa fungsi utama Xray antara lain:
- Subdomain discovery: Menemukan subdomain dari suatu domain utama.
- Port scanning: Memindai port yang terbuka pada suatu host.
- Vulnerability scanning: Mencari kerentanan umum seperti SQL injection, XSS, dan lainnya.
- Fingerprinting: Mengidentifikasi teknologi yang digunakan pada target.
Dengan kata lain, Xray adalah seperti sebuah senter yang sangat kuat untuk mencari celah keamanan pada sistem komputer.
Langkah-langkah Instalasi di Linux:
- Kunjungi Repositori GitHub Xray:
- Buka browser Anda dan kunjungi halaman repositori Xray di GitHub: https://github.com/chaitin/xray
- Unduh File Biner:
- Cari bagian “Releases” atau “Releases” pada halaman repositori.
- Pilih versi Xray yang ingin Anda instal. Pastikan versi tersebut sesuai dengan sistem operasi Anda (Windows, Linux, atau macOS).
- Unduh file biner yang sesuai (biasanya berupa file zip atau tar.gz).
- Ekstrak File:
- Setelah unduhan selesai, ekstrak file zip atau tar.gz ke direktori yang Anda inginkan.
- Jalankan Xray:
- Buka terminal atau command prompt.
- Navigasi ke direktori tempat Anda mengekstrak file Xray.
- Jalankan perintah berikut untuk melihat opsi penggunaan:
./xray -h
Contoh Penggunaan
Setelah berhasil menginstal, Anda bisa menggunakan Xray untuk memindai suatu target. Misalnya, untuk memindai sebuah website, Anda bisa menggunakan perintah seperti ini:
Use the basic crawler to scan the links crawled by the crawler for vulnerabilities:
./xray webscan --basic-crawler http://example.com --html-output vuln.html
Use HTTP proxy for passive scanning:
./xray webscan --listen 127.0.0.1:7777 --html-output proxy.html
Set the browser’s HTTP proxy to http://127.0.0.1:7777
, then you can automatically analyze proxy traffic and scan it.
To scan HTTPS traffic, please read the “Capture HTTPS Traffic” section below.
Scan a single URL without using a crawler:
xray webscan --url http://example.com/?a=b --html-output single-url.html
Manually specify plugins for this run
By default, all built-in plugins will be enabled. You can specify the plugins to be enabled for this scan with the following commands.
xray webscan --plugins cmd-injection,sqldet --url http://example.com
xray webscan --plugins cmd-injection,sqldet --listen 127.0.0.1:7777
Specify Plugin Output
You can specify to output the vulnerability information of this scan to a file:
xray webscan --url http://example.com/?a=b \
--text-output result.txt --json-output result.json --html-output report.html
Detection Modules:
New detection modules will be continuously added.
Name | Key | Version | Description |
---|---|---|---|
XSS Detection | xss | Community | Detects XSS vulnerabilities using semantic analysis |
SQL Injection Detection | sqldet | Community | Supports error-based injection, boolean-based injection, and time-based blind injection |
Command/Code Injection Detection | cmd-injection | Community | Supports shell command injection, PHP code execution, template injection, etc. |
Directory Enumeration | dirscan | Community | Detects over 10 types of sensitive paths and files such as backup files, temporary files, debug pages, and configuration files |
Path Traversal Detection | path-traversal | Community | Supports common platforms and encodings |
XML External Entity (XXE) Detection | xxe | Community | Supports detection with echo and back-connect platform |
POC Management | phantasm | Community | Comes with some common POCs by default; users can build and run POCs as needed. Documentation: POC |
File Upload Detection | upload | Community | Supports common backend languages |
Weak Password Detection | brute-force | Community | Community edition supports HTTP basic authentication and simple form weak password detection, with built-in common username and password dictionary |
JSONP Detection | jsonp | Community | Detects JSONP interfaces containing sensitive information that can be read across domains |
SSRF Detection | ssrf | Community | SSRF detection module, supports common bypass techniques and back-connect platform detection |
Baseline Check | baseline | Community | Detects low SSL versions, missing or incorrectly added HTTP headers |
Arbitrary Redirect Detection | redirect | Community | Supports HTML meta redirects, 30x redirects, etc. |
CRLF Injection | crlf-injection | Community | Detects HTTP header injection, supports parameters in query, body, etc. |
XStream Vulnerability Detection | xstream | Community | Detects XStream series vulnerabilities |
Struts2 Vulnerability Detection | struts | Advanced | Detects Struts2 series vulnerabilities, including common ones like s2-016, s2-032, s2-045, s2-059, s2-061, etc. |
ThinkPHP Vulnerability Detection | thinkphp | Advanced | Detects related vulnerabilities in websites developed with ThinkPHP |
Shiro Deserialization Vulnerability Detection | shiro | Advanced | Detects Shiro deserialization vulnerabilities |
Fastjson Vulnerability Detection | fastjson | Advanced | Detects Fastjson series vulnerabilities |
Kesimpulannya, Xray adalah alat yang sangat berguna bagi para pentester dan peneliti keamanan. Alat ini dapat membantu mereka menemukan kerentanan pada aplikasi web dan infrastruktur jaringan secara lebih efisien. Namun, penting untuk menggunakan alat ini dengan bijak dan bertanggung jawab.
Disclaimer: Informasi yang diberikan di sini hanya untuk tujuan pendidikan dan informasi. Penggunaan alat hacking tanpa izin dapat melanggar hukum.