Skip to main content
Remote Arachni vulnerability scanner that executes scans on a remote Linux server via SSH and retrieves results.

Overview

The arachni_scan_remote.bat script connects to a remote Linux server running Arachni, executes a comprehensive vulnerability scan, generates HTML reports, and downloads the results. It uses PuTTY tools (plink and pscp) for SSH communication.

Parameters

Usage

Prerequisites

Required tools in script directory:
  • plink.exe - PuTTY command-line SSH client
  • pscp.exe - PuTTY secure copy (SCP) client
  • Login_fast.rb - Login script template (copied to remote server)
Remote server requirements:
  • Arachni installed and in PATH
  • SSH server running on port 22
  • Write access to /tmp directory
  • Ruby installed (for login scripts)

Script Workflow

1. Upload Login Script

Copies the local login script to the remote server:
Source: %~dp0Login_fast.rb → Destination: /tmp/Login on remote server

2. Execute Arachni Scan

Runs a comprehensive Arachni scan on the remote server:

3. Generate HTML Report

Converts the Arachni Framework Report (.afr) to HTML:

4. Download and Cleanup

Retrieves the report and removes remote files:

Scan Configuration

Default Platform Settings

The script is configured for Windows/IIS/ASP.NET applications:
For Linux/Apache/PHP applications, uncomment arachni_scan_remote.bat:23:
View all available platforms:

Scope Exclusion

The script excludes logout pages to prevent session termination:
Modify at arachni_scan_remote.bat:21 to exclude other patterns:

User Agent

Default user agent:

Audit Modules

The script enables all audit modules:

Login Script Configuration

The script uses the login_script plugin with /tmp/Login for authenticated scanning.

Fast Login (No Browser)

Example login script structure in Login_fast.rb:

Browser-Based Login (Commented)

For complex login forms requiring JavaScript, see comments at arachni_scan_remote.bat:32-44:
Note: Browser-based login requires additional gems:

Alternative: AutoLogin Plugin

For simple form-based authentication, use the autologin plugin (see comments at arachni_scan_remote.bat:63-65):

HTTP Authentication

For HTTP Basic/Digest authentication, uncomment and configure arachni_scan_remote.bat:16-19:

Output Files

Local Report

Downloaded to:
Extract the ZIP to access the HTML report.

Remote Files (Auto-Deleted)

  • /tmp/Login - Login script
  • /tmp/ArachniReport - {Timestamp}.afr - Arachni Framework Report
  • /tmp/ArachniReport - {Timestamp}.zip - HTML report archive
All remote files are deleted after download.

Example Usage Scenarios

Windows/IIS Application

Linux/Apache/PHP Application

Modify platform at arachni_scan_remote.bat:23, then:

Multiple Scans with Different Logins

Create custom login scripts for different applications:

Security Considerations

  • Passwords in plain text: The script passes SSH passwords on the command line
  • Use key-based authentication in production environments instead of passwords
  • Secure the remote server: Ensure only authorized users have SSH access
  • Network security: Use VPN or private network for scanner traffic

Using SSH Keys Instead

Modify the script to use Pageant (PuTTY’s SSH agent) or convert to use SSH keys:

Troubleshooting

SSH Connection Failed

Symptoms: Script hangs or shows connection errors Solutions:
  • Verify server hostname/IP is reachable: ping SERVER
  • Check SSH is running on port 22
  • Verify credentials are correct
  • Test manual connection: plink.exe -ssh -P 22 -l USERNAME -pw PASSWORD SERVER

Arachni Command Not Found

Symptoms: Remote command fails with “arachni: command not found” Solutions:
  • Install Arachni on remote server
  • Ensure Arachni is in PATH: which arachni
  • Use full path: /opt/arachni/bin/arachni

Login Script Errors

Symptoms: Scan completes but misses authenticated pages Solutions:
  • Test login script manually on remote server
  • Verify session check pattern matches logged-in state
  • Check credentials in Login_fast.rb are correct
  • Review Arachni scan log for authentication errors

Report Download Fails

Symptoms: pscp.exe fails to download report Solutions:
  • Verify local Documentacion path exists and is writable
  • Check remote /tmp has sufficient space
  • Ensure firewall allows SCP traffic
  • Test manual download: pscp.exe -P 22 -l USER -pw PASS SERVER:/tmp/test.txt C:\

Insufficient Disk Space

Symptoms: Scan fails or report generation fails Solutions:
  • Check remote /tmp disk space: plink.exe ... SERVER "df -h /tmp"
  • Clean up old scan files in /tmp
  • Configure Arachni to use different output directory with more space

Performance Tuning

Concurrent Scans

The script does not limit concurrent scans. For multiple targets, stagger execution manually:

Scan Speed

To adjust scan aggressiveness, add to the Arachni command:

Resource Limits

Monitor remote server resources during scans: