Usage Guide

Complete guide to using Apache Sling Auditor effectively.

Basic Usage

Command Structure

1
python auditor.py -t <target_url> [options]

Required Arguments

Example

1
python auditor.py -t http://target.com:4502

Scan Modes

Quick Mode

Fast security assessment focusing on critical vulnerabilities:

1
python auditor.py -t http://target.com:4502 --mode quick

Characteristics:

Full Mode (Default)

Comprehensive security audit with all checks:

1
2
3
python auditor.py -t http://target.com:4502 --mode full
# or simply
python auditor.py -t http://target.com:4502

Characteristics:

Stealth Mode

Low-profile scanning with minimal footprint:

1
python auditor.py -t http://target.com:4502 --mode stealth

Characteristics:

Authentication

Basic Authentication

1
2
3
python auditor.py -t http://target.com:4502 \
  -u admin \
  -p password

Note: When credentials are provided via

1
-u
and
1
-p
, they are used for authenticated requests. However, default credential testing (from
1
config/audit_config.yaml
) only occurs if authentication-required paths are detected first during the scan.

Form-Based Authentication

The auditor automatically detects and handles form-based authentication when testing protected endpoints. Both form-based and HTTP Basic authentication are supported.

Wordlist Enumeration

Basic Wordlist Usage

1
2
python auditor.py -t http://target.com:4502 \
  --wordlist wordlists/sling_paths.txt

Extended Wordlist

1
2
python auditor.py -t http://target.com:4502 \
  --wordlist wordlists/sling_paths_extended.txt

Performance Note: Large wordlists (thousands of paths) are loaded entirely into memory. For very large wordlists, consider:

Custom Wordlist

1
2
python auditor.py -t http://target.com:4502 \
  --wordlist /path/to/custom/wordlist.txt

Wordlist Format:

Exploitation Mode

Enable Exploitation

1
python auditor.py -t http://target.com:4502 --exploit

What it does:

Exploit Outputs

Exploit outputs are saved to:

1
2
3
4
5
6
scan_results/<timestamp>/exploits/
├── CVE-2021-44228/
├── CVE-2018-12809/
│   └── xss_poc_*.html
└── CVE-2017-12617/
    └── extracted_*.txt

Brute Force Testing

Basic Brute Force

1
python auditor.py -t http://target.com:4502 --brute-force

Uses default wordlists from

1
wordlists/
directory.

Custom Wordlists

1
2
3
4
python auditor.py -t http://target.com:4502 \
  --brute-force \
  --username-wordlist /path/to/usernames.txt \
  --password-wordlist /path/to/passwords.txt

Combined with Authentication

1
2
3
python auditor.py -t http://target.com:4502 \
  --brute-force \
  -u admin -p admin  # Test default first

Advanced Options

Proxy Support

1
2
python auditor.py -t http://target.com:4502 \
  --proxy http://127.0.0.1:8080

Custom User-Agent

1
2
python auditor.py -t http://target.com:4502 \
  --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"

Custom Cookies

1
2
python auditor.py -t http://target.com:4502 \
  --cookies "session=abc123; token=xyz789"

Timeout Configuration

1
2
python auditor.py -t http://target.com:4502 \
  --timeout 30  # 30 seconds

Concurrent Threads

1
2
python auditor.py -t http://target.com:4502 \
  --threads 10  # 10 concurrent requests

SSL/TLS Options

1
2
python auditor.py -t https://target.com:4503 \
  -k  # Allow insecure SSL connections

Verbose Output

1
python auditor.py -t http://target.com:4502 -v

Shows detailed information about:

Custom Output Directory

1
2
python auditor.py -t http://target.com:4502 \
  -o /path/to/output

Complete Examples

Example 1: Comprehensive Audit

1
2
3
4
5
6
7
8
python auditor.py -t http://target.com:4502 \
  --mode full \
  --wordlist wordlists/sling_paths_extended.txt \
  --exploit \
  --brute-force \
  --verbose \
  --threads 10 \
  --timeout 15

Example 2: Covert Assessment

1
2
3
4
5
6
python auditor.py -t https://target.com:4503 \
  --mode stealth \
  --proxy http://127.0.0.1:8080 \
  --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" \
  --cookies "session=abc123" \
  -k

Example 3: Quick Security Check

1
2
3
python auditor.py -t http://target.com:4502 \
  --mode quick \
  -v

Example 4: Credential Testing

1
2
3
4
5
python auditor.py -t http://target.com:4502 \
  --brute-force \
  --username-wordlist wordlists/aem_usernames.txt \
  --password-wordlist wordlists/common_passwords.txt \
  --threads 3  # Lower threads for brute force

Example 5: Path Discovery

1
2
3
4
python auditor.py -t http://target.com:4502 \
  --wordlist wordlists/sling_paths.txt \
  --threads 10 \
  -v

Understanding Output

Console Output

The auditor provides real-time feedback:

1
2
3
4
5
6
7
8
9
10
11
[INFO] Starting scan...
[INFO] Target: http://target.com:4502
[INFO] Mode: full
[INFO] Version detection...
[CRITICAL] Found CRITICAL severity issue: Log4Shell
  Path: /system/console
  Description: Potential Log4Shell vulnerability detected
  CVE: CVE-2021-44228
[HIGH] Found HIGH severity issue: Exposed OSGI Console
  Path: /system/console
  Description: OSGI Console is publicly accessible

Report Files

After scanning, reports are saved to:

1
2
scan_results/YYYYMMDD_HHMMSS/
└── detailed_report.json

Note: Currently, only JSON reports are generated. HTML and text summary reports are planned for future releases. The JSON report contains all scan results and findings in a structured format.

Report Structure

The JSON report contains:

Best Practices

1. Start with Quick Mode

1
python auditor.py -t http://target.com:4502 --mode quick

Get an overview before running comprehensive scans.

2. Use Verbose Mode for Debugging

1
python auditor.py -t http://target.com:4502 -v

See detailed information about detection logic.

3. Save Reports

Reports are automatically saved, but you can specify a custom location:

1
python auditor.py -t http://target.com:4502 -o /path/to/reports

4. Adjust Threads Based on Target

5. Use Stealth Mode for Production

1
python auditor.py -t http://target.com:4502 --mode stealth

Minimize impact on production systems.

6. Combine Features Strategically

1
2
3
4
5
6
7
8
# Initial reconnaissance
python auditor.py -t http://target.com:4502 --mode quick

# Comprehensive audit
python auditor.py -t http://target.com:4502 --mode full --wordlist wordlists/sling_paths.txt

# Exploitation
python auditor.py -t http://target.com:4502 --exploit

Troubleshooting

Common Issues

Issue: Scan takes too long

Issue: Too many false positives

Issue: Connection errors

Issue: Memory usage high

Issue: Default credentials not being tested

Issue: Rate limiting detected

Command-Line Reference

See API Reference for complete command-line options.


Need help? Check out the Examples or Configuration Guide!