Top Related Projects
Fast and customizable vulnerability scanner based on simple YAML based DSL.
Automatic SQL injection and database takeover tool
Nikto web server scanner
WPScan WordPress security scanner. Written for security professionals and blog maintainers to test the security of their WordPress websites. Contact us via contact@wpscan.com
The ZAP by Checkmarx Core project
Most advanced XSS scanner.
Quick Overview
Xray is an advanced security assessment tool designed for web applications and networks. It offers comprehensive vulnerability scanning, penetration testing, and security analysis capabilities, making it a versatile solution for identifying and addressing potential security risks in various digital environments.
Pros
- Comprehensive scanning capabilities covering a wide range of vulnerabilities
- Active community support and regular updates
- User-friendly interface and easy-to-understand reports
- Supports both web application and network security assessments
Cons
- Limited documentation in English, as the primary language is Chinese
- May require significant system resources for large-scale scans
- Some advanced features may have a learning curve for new users
Getting Started
To get started with Xray:
- Download the latest release from the GitHub repository.
- Extract the files to a directory of your choice.
- Open a terminal and navigate to the Xray directory.
- Run the following command to start a basic web scan:
./xray webscan --basic-crawler http://example.com --html-output vuln.html
- For more advanced usage, refer to the documentation (primarily in Chinese) or community resources.
Note: Always ensure you have proper authorization before scanning any target systems or networks.
Competitor Comparisons
Fast and customizable vulnerability scanner based on simple YAML based DSL.
Pros of Nuclei
- More extensive and actively maintained template library
- Supports a wider range of protocols and technologies
- Better community support and contribution ecosystem
Cons of Nuclei
- Steeper learning curve for creating custom templates
- May require more system resources for large-scale scans
Code Comparison
Xray configuration example:
plugins:
- name: sqldet
enabled: true
- name: xss
enabled: true
Nuclei template example:
id: cve-2021-44228-log4j-rce
info:
name: Apache Log4j RCE
severity: critical
http:
- raw:
- |
GET /${jndi:ldap://{{Hostname}}/a} HTTP/1.1
Host: {{Hostname}}
Key Differences
- Xray uses a plugin-based approach, while Nuclei relies on YAML templates
- Nuclei offers more granular control over individual vulnerability checks
- Xray provides a more user-friendly interface for basic scans
Use Cases
- Xray: Suitable for quick, automated scans with minimal configuration
- Nuclei: Ideal for in-depth, customizable security assessments and research
Both tools are valuable for vulnerability scanning, but Nuclei offers more flexibility and extensibility for advanced users, while Xray provides a simpler experience for basic security checks.
Automatic SQL injection and database takeover tool
Pros of sqlmap
- Specialized in SQL injection detection and exploitation
- Extensive database support and advanced features for database enumeration
- Large, active community and frequent updates
Cons of sqlmap
- Limited to SQL injection vulnerabilities only
- Steeper learning curve for advanced features
- Can be slower for large-scale scans compared to more general-purpose tools
Code Comparison
sqlmap (Python):
def getFileContent(filepath):
content = None
try:
with open(filepath, "rb") as f:
content = f.read()
except IOError:
pass
return content
xray (Go):
func ReadFileContent(filename string) ([]byte, error) {
return ioutil.ReadFile(filename)
}
Key Differences
- sqlmap focuses solely on SQL injection, while xray is a more comprehensive security assessment tool
- xray offers a wider range of vulnerability detection capabilities, including XSS, SSRF, and more
- sqlmap provides deeper SQL injection analysis and exploitation features
- xray is written in Go, which may offer performance benefits for certain tasks
- sqlmap has a larger user base and more extensive documentation
Both tools are valuable for security professionals, with sqlmap excelling in SQL injection scenarios and xray offering a broader vulnerability assessment approach.
Nikto web server scanner
Pros of Nikto
- Longer history and wider adoption in the security community
- Extensive plugin system for customization and extensibility
- Lightweight and can run on systems with limited resources
Cons of Nikto
- Slower scanning speed compared to Xray
- Less frequent updates and maintenance
- Limited reporting options and user interface
Code Comparison
Nikto (Perl):
sub nikto_headers {
my ($mark) = @_;
my %headers;
foreach my $header (split(/\n/, $mark->{'headers'})) {
my ($key, $value) = split(/:\s*/, $header, 2);
$headers{lc($key)} = $value;
}
return %headers;
}
Xray (Go):
func ParseHeaders(headers string) map[string]string {
headerMap := make(map[string]string)
for _, line := range strings.Split(headers, "\n") {
parts := strings.SplitN(line, ":", 2)
if len(parts) == 2 {
headerMap[strings.TrimSpace(parts[0])] = strings.TrimSpace(parts[1])
}
}
return headerMap
}
Both code snippets demonstrate header parsing functionality, with Nikto using Perl and Xray using Go. Xray's implementation is more concise and leverages Go's built-in functions for string manipulation.
WPScan WordPress security scanner. Written for security professionals and blog maintainers to test the security of their WordPress websites. Contact us via contact@wpscan.com
Pros of WPScan
- Specialized for WordPress security scanning, offering deep insights into WordPress-specific vulnerabilities
- Extensive database of WordPress vulnerabilities, regularly updated
- Supports both CLI and API usage, providing flexibility for different use cases
Cons of WPScan
- Limited to WordPress sites, unlike Xray's broader web application scanning capabilities
- May require more manual configuration and interpretation of results compared to Xray's user-friendly interface
Code Comparison
WPScan (Ruby):
def scan
run_plugins
enumerate_users
check_vulnerabilities
end
Xray (Go):
func Scan(target string) {
runPlugins()
detectVulnerabilities()
generateReport()
}
Both projects use a modular approach for scanning, but Xray's implementation in Go may offer performance advantages over WPScan's Ruby codebase. WPScan's code focuses on WordPress-specific elements, while Xray's is more generalized for various web applications.
WPScan excels in WordPress-specific security scanning, offering deep insights into CMS vulnerabilities. However, its specialization limits its use to WordPress sites. Xray provides a more versatile solution for scanning various web applications, potentially offering broader coverage but with less WordPress-specific depth. The choice between the two depends on the specific needs of the user and the target applications.
The ZAP by Checkmarx Core project
Pros of ZAP
- More mature and widely adopted project with a larger community
- Extensive documentation and tutorials available
- Supports multiple scripting languages for customization (JavaScript, Python, Ruby)
Cons of ZAP
- Steeper learning curve for beginners
- Can be resource-intensive for large-scale scans
- UI may feel outdated compared to more modern tools
Code Comparison
ZAP (Java):
public class ActiveScan extends AbstractAppParamPlugin {
@Override
public void scan(HttpMessage msg, String param, String value) {
// Scanning logic here
}
}
Xray (Go):
func (p *Plugin) Check(url *url.URL, resp *http.Response, body []byte) ([]poc.VulnResult, error) {
// Vulnerability checking logic here
}
Both repositories focus on web security scanning, but they differ in implementation languages and specific features. ZAP is written in Java and offers a more comprehensive set of tools, while Xray is written in Go and aims for simplicity and ease of use. ZAP provides a full-featured GUI and API, whereas Xray is primarily designed for command-line usage and integration into CI/CD pipelines.
Most advanced XSS scanner.
Pros of XSStrike
- Focused specifically on XSS detection and exploitation
- Lightweight and easy to use for targeted XSS testing
- Actively maintained with frequent updates
Cons of XSStrike
- Limited to XSS vulnerabilities, while xray covers a broader range of security issues
- Less comprehensive scanning capabilities compared to xray's multi-threaded approach
- Smaller community and fewer contributors
Code Comparison
XSStrike (Python):
def scan(url, params, headers, GET, delay, timeout):
global globalVariables
globalVariables = {}
paramsCopy = copy.deepcopy(params)
headers = copy.deepcopy(headers)
GET = GET
delay = delay
timeout = timeout
xray (Go):
func (p *Poc) Execute(url string) (result PluginResult, err error) {
result.Vulnerable = false
result.Target = url
for _, rule := range p.Rules {
ok, err := rule.Execute(url)
if err != nil {
return result, err
}
if ok {
result.Vulnerable = true
break
}
}
return
}
Both tools utilize different programming languages and approaches, with XSStrike focusing on XSS-specific scanning logic, while xray implements a more generalized vulnerability detection framework.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Welcome to xray ð
ä¸æ¬¾åè½å¼ºå¤§çå®å ¨è¯ä¼°å·¥å ·
ð 使ç¨ææ¡£ ⢠â¬ï¸xrayä¸è½½ ⢠â¬ï¸xpocä¸è½½ ⢠â¬ï¸xappä¸è½½ ⢠ðæ件åå¨åº
注æï¼xrayç³»åä¸å¼æºï¼ç´æ¥ä¸è½½æ建çäºè¿å¶æ件å³å¯ï¼ä»åºå 主è¦ä¸ºç¤¾åºè´¡ç®ç pocï¼æ¯æ¬¡ xray åå¸å°èªå¨æå ã
⨠xray2.0
为äºè§£å³ xray 1.0å¨åè½å¢å è¿ç¨ä¸åå¾å¤æä¸èè¿çé®é¢ï¼æ们æ¨åºäº xray 2.0ã
è¿ä¸å ¨æ°çæ¬è´åäºæååè½ä½¿ç¨çæµç 度ï¼éä½ä½¿ç¨é¨æ§ï¼å¹¶å¸®å©æ´å¤å®å ¨è¡ä¸ä»ä¸è 以æ´é«æç模å¼æ¶è·æ´å¥½çä½éªãxray 2.0 å°æ´åä¸ç³»åæ°çå®å ¨å·¥å ·ï¼å½¢æä¸ä¸ªå ¨é¢çå®å ¨å·¥å ·éã
xray2.0ç³»åç第äºæ¬¾å·¥å ·xappå·²ç»ä¸çº¿ï¼æ¬¢è¿ä½éªï¼
XPOC
xpocæ¯xray2.0ç³»åç第ä¸æ¬¾å·¥å ·ï¼å®æ¯ä¸æ¬¾ä¸ºä¾åºé¾æ¼æ´æ«æ设计çå¿«éåºæ¥ååºå·¥å ·
项ç®å°åï¼https://github.com/chaitin/xpoc
XAPP
xappæ¯ä¸æ¬¾ä¸æ³¨äºwebæ纹è¯å«çå·¥å ·ãä½ å¯ä»¥ä½¿ç¨xapp对webç®æ æ使ç¨çææ¯è¿è¡è¯å«ï¼ä¸ºå®å ¨æµè¯å好åå¤ã
项ç®å°åï¼https://github.com/chaitin/xapp
æ件åå¨åº
æ们为åç±»æ件å建äºä¸ä¸ªä¸é¨çåå¨åºï¼æ¨å¨æ¹ä¾¿å¤§å®¶å ±äº«å使ç¨åç§æ件ã
è¿é主è¦æ¶å½çæ¯å¼æºçã转åæ xrayæ ¼å¼çèæ¬ï¼ä»¥ä¾å¤§å®¶ä½¿ç¨ã
æ们ä¼ä¸å®æå°å¾è¿éæ¨éä¸äºæ°çæ件ï¼åæ¶ä¹å¸æ大家è½ç§¯æè¸è·çä¼åæè æ交æ件ï¼å ±å丰å¯è¿ä¸ªä»åºã
项ç®å°åï¼https://github.com/chaitin/xray-plugins
ð å¿«é使ç¨
å¨ä½¿ç¨ä¹åï¼è¯·å¡å¿ é 读并åæ License æ件ä¸çæ¡æ¬¾ï¼å¦å请å¿å®è£ 使ç¨æ¬å·¥å ·ã
-
使ç¨åºç¡ç¬è«ç¬å并对ç¬è«ç¬åçé¾æ¥è¿è¡æ¼æ´æ«æ
xray webscan --basic-crawler http://example.com --html-output vuln.html
-
ä½¿ç¨ HTTP 代çè¿è¡è¢«å¨æ«æ
xray webscan --listen 127.0.0.1:7777 --html-output proxy.html
设置æµè§å¨ http 代ç为
http://127.0.0.1:7777
ï¼å°±å¯ä»¥èªå¨åæ代çæµé并æ«æãå¦éæ«æ https æµéï¼è¯·é 读ä¸æ¹ææ¡£
æå https æµé
é¨å -
åªæ«æå个 urlï¼ä¸ä½¿ç¨ç¬è«
xray webscan --url http://example.com/?a=b --html-output single-url.html
-
æå¨æå®æ¬æ¬¡è¿è¡çæ件
é»è®¤æ åµä¸ï¼å°ä¼å¯ç¨ææå ç½®æ件ï¼å¯ä»¥ä½¿ç¨ä¸åå½ä»¤æå®æ¬æ¬¡æ«æå¯ç¨çæ件ã
xray webscan --plugins cmd-injection,sqldet --url http://example.com xray webscan --plugins cmd-injection,sqldet --listen 127.0.0.1:7777
-
æå®æ件è¾åº
å¯ä»¥æå®å°æ¬æ¬¡æ«æçæ¼æ´ä¿¡æ¯è¾åºå°æ个æ件ä¸:
xray webscan --url http://example.com/?a=b \ --text-output result.txt --json-output result.json --html-output report.html
å ¶ä»ç¨æ³è¯·é 读ææ¡£ï¼ https://docs.xray.cool
ðª æ£æµæ¨¡å
æ°çæ£æµæ¨¡åå°ä¸ææ·»å
å称 | Key | çæ¬ | 说æ |
---|---|---|---|
XSSæ¼æ´æ£æµ | xss | 社åºç | å©ç¨è¯ä¹åæçæ¹å¼æ£æµXSSæ¼æ´ |
SQL æ³¨å ¥æ£æµ | sqldet | 社åºç | æ¯ææ¥éæ³¨å ¥ãå¸å°æ³¨å ¥åæ¶é´ç²æ³¨ç |
å½ä»¤/代ç æ³¨å ¥æ£æµ | cmd-injection | 社åºç | æ¯æ shell å½ä»¤æ³¨å ¥ãPHP 代ç æ§è¡ã模æ¿æ³¨å ¥ç |
ç®å½æ举 | dirscan | 社åºç | æ£æµå¤ä»½æ件ã临æ¶æ件ãdebug 页é¢ãé ç½®æ件ç10ä½ç±»ææè·¯å¾åæ件 |
è·¯å¾ç©¿è¶æ£æµ | path-traversal | 社åºç | æ¯æ常è§å¹³å°åç¼ç |
XML å®ä½æ³¨å ¥æ£æµ | xxe | 社åºç | æ¯ææåæ¾ååè¿å¹³å°æ£æµ |
poc 管ç | phantasm | 社åºç | é»è®¤å ç½®é¨å常ç¨ç pocï¼ç¨æ·å¯ä»¥æ ¹æ®éè¦èªè¡æ建 poc 并è¿è¡ãææ¡£ï¼POC |
æ件ä¸ä¼ æ£æµ | upload | 社åºç | æ¯æ常è§çå端è¯è¨ |
å¼±å£ä»¤æ£æµ | brute-force | 社åºç | 社åºçæ¯ææ£æµ HTTP åºç¡è®¤è¯åç®æ表åå¼±å£ä»¤ï¼å 置常è§ç¨æ·ååå¯ç åå ¸ |
jsonp æ£æµ | jsonp | 社åºç | æ£æµå å«ææä¿¡æ¯å¯ä»¥è¢«è·¨å读åç jsonp æ¥å£ |
ssrf æ£æµ | ssrf | 社åºç | ssrf æ£æµæ¨¡åï¼æ¯æ常è§çç»è¿ææ¯ååè¿å¹³å°æ£æµ |
åºçº¿æ£æ¥ | baseline | 社åºç | æ£æµä½ SSL çæ¬ã缺失çæé误添å ç http 头ç |
ä»»æ跳转æ£æµ | redirect | 社åºç | æ¯æ HTML meta 跳转ã30x 跳转ç |
CRLF æ³¨å ¥ | crlf-injection | 社åºç | æ£æµ HTTP å¤´æ³¨å ¥ï¼æ¯æ queryãbody çä½ç½®çåæ° |
XStreamæ¼æ´æ£æµ | xstream | 社åºç | æ£æµXStreamç³»åæ¼æ´ |
Struts2 ç³»åæ¼æ´æ£æµ | struts | é«çº§ç | æ£æµç®æ ç½ç«æ¯å¦åå¨Struts2ç³»åæ¼æ´ï¼å æ¬s2-016ãs2-032ãs2-045ãs2-059ãs2-061ç常è§æ¼æ´ |
Thinkphpç³»åæ¼æ´æ£æµ | thinkphp | é«çº§ç | æ£æµThinkPHPå¼åçç½ç«çç¸å ³æ¼æ´ |
shiroååºååæ¼æ´æ£æµ | shiro | é«çº§ç | æ£æµShiroååºååæ¼æ´ |
fastjsonç³»åæ£æµ | fastjson | é«çº§ç | æ£æµfastjsonç³»åæ¼æ´ |
â¡ï¸ è¿é¶ä½¿ç¨
ä¸åé«çº§ç¨æ³è¯·æ¥ç https://docs.xray.cool/ 使ç¨ã
- ä¿®æ¹é ç½®æ件
- æå https æµé
- ä¿®æ¹ http åå é ç½®
- åè¿å¹³å°ç使ç¨
- ...
ð è´¡ç® POC
xrayçè¿æ¥ç¦»ä¸å¼åä½å¸å çæ¯æï¼ç§æçäºå©å ±å»ºçç²¾ç¥ï¼ä¸ºäºè®©æä»¬å ±åè¿æ¥ï¼xrayä¹å¼éäºâPoCæ¶å½âçæ¸ éï¼å¨è¿éä½ å°ä¼å¾å°ï¼
æ交æµç¨
- è´¡ç®è 以 PR çæ¹å¼å github xray 社åºä»åºå æäº¤ï¼ POC æ交ä½ç½®: https://github.com/chaitin/xray/tree/master/pocs, æ纹è¯å«èæ¬æ交ä½ç½®: https://github.com/chaitin/xray/tree/master/fingerprints
- PR ä¸æ ¹æ® Pull Request ç模æ¿å¡«å POC ä¿¡æ¯
- å é¨å®¡æ ¸ PRï¼ç¡®å®æ¯å¦åå¹¶å ¥ä»åº
- ä½éè¦æ³¨æï¼å¦ææ³è¦è·å¾POCçå¥å±ï¼éè¦å°ä½ çPOCæ交å°CT stackï¼æè½è·åå°å¥å±
丰åçå¥å±
- è´¡ç®PoCå°è·å¾**丰åçéå¸å¥å±**ï¼æå°±æ满满ï¼
- 丰å¯ç礼åå æ¢ä¸åºï¼50ä½ç§å¨è¾¹ç¤¼åä»»ä½ æéï¼
- å®ææ´æ京ä¸å¡ä¸çº¿å æ¢ï¼ç¦»**è´¢å¯èªç±**åè¿äºä¸æ¥ï¼
- è¿å ¥æ ¸å¿ç¤¾ç¾¤çæºä¼ï¼é¢åç¹æ®ä»»å¡ï¼èµåé«é¢èµéï¼
å®åçæç¨
- å®åçPoCç¼åæç¨åæ导ï¼è®©ä½ å¿«éä¸æï¼å°èµ°å¼¯è·¯ï¼
å¦ä¹ ä¸äº¤æµ
- **ä¸è´¡ç®è ãå¼åè é¢å¯¹é¢**å¦ä¹ 交æµçæºä¼ï¼å项è½å综åæé«ï¼
- å ç¬è¯çç´éé¢è¯æºä¼ï¼å¥½å·¥ä½ä¸æ¯æ¢¦ï¼
å¦æä½ å·²ç»æåè´¡ç®è¿PoCä½æ¯è¿æ²¡æè¿ç¾¤ï¼è¯·æ·»å 客æ微信ï¼
æä¾å¹³å°æ³¨åidè¿è¡éªè¯ï¼éªè¯éè¿åå³å¯è¿ç¾¤ï¼
åç §: https://docs.xray.cool/#/guide/contribute
ð§å¨è¾¹çæ
POCè´¨é确认é¶åº
ä¸ä¸ªä¸é¨ç¨äºè®©æ«æå¨äº§ç误æ¥çé¶åº
ç¼åæ件åºè¯¥å°½éé¿å è½å¨è¿ä¸ªé¶åºæ«æåºç»æ
POCç¼åè¾ å©å·¥å ·
è¯¥å·¥å ·å¯ä»¥è¾ å©çæPOCï¼ä¸å¨çº¿çæ¯æpocæ¥éï¼æ¬å°çæ¯æç´æ¥åå éªè¯
å¨çº¿ç
- è§åå®éªå®¤
- å¨çº¿çæ¯æ对pocæ¥é
æ¬å°ç
xray guiè¾ å©å·¥å ·
æ¬å·¥å ·ä» æ¯ç®åçå½ä»¤è¡å è£ ï¼å¹¶ä¸æ¯ç´æ¥è°ç¨æ¹æ³ãå¨ xray çè§åä¸ï¼æªæ¥ä¼æä¸æ¬¾çæ£çå®åç GUI ç XrayPro å·¥å ·ï¼æ¬è¯·æå¾ ã
ð 讨论åº
åä½å¼åè å xray ç²ä¸ä»¬ï¼æ¬¢è¿æ¥è®¨è®ºåºæ票ï¼å³å® xray 2.0 å·¥å ·çå¼åä¼å 级ï¼è®©ä½ ç声é³å¡é xray çæªæ¥ï¼ ð
æ交误æ¥æ¼æ¥éæ±çç请å¡å¿ å é 读 https://docs.xray.cool/#/guide/feedback
å¦æé®é¢å¯ä»¥å¨ GitHub æ issue, ä¹å¯å¨ä¸æ¹ç讨论ç»é
-
GitHub:
-
å¾®ä¿¡å ¬ä¼å·ï¼å¾®ä¿¡æ«æ以ä¸äºç»´ç ï¼å ³æ³¨æ们
-
微信群: 请添å å¾®ä¿¡å ¬ä¼å·å¹¶ç¹å»"èç³»æ们" -> "å 群"ï¼ç¶åæ«æäºç»´ç å 群
-
QQ 群: 717365081
Star History
Top Related Projects
Fast and customizable vulnerability scanner based on simple YAML based DSL.
Automatic SQL injection and database takeover tool
Nikto web server scanner
WPScan WordPress security scanner. Written for security professionals and blog maintainers to test the security of their WordPress websites. Contact us via contact@wpscan.com
The ZAP by Checkmarx Core project
Most advanced XSS scanner.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot