EyeWitness
EyeWitness is designed to take screenshots of websites, provide some server header info, and identify default credentials if possible.
Top Related Projects
EyeWitness is designed to take screenshots of websites, provide some server header info, and identify default credentials if possible.
A Tool for Domain Flyovers
🔍 gowitness - a golang, web screenshot utility using Chrome Headless
Nmap - the Network Mapper. Github mirror of official SVN repository.
TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.
A swiss army knife for pentesting networks
Quick Overview
EyeWitness is an open-source tool designed for taking screenshots of websites, providing server header information, and identifying default credentials if possible. It's particularly useful for penetration testers and security professionals who need to quickly assess and document large numbers of web servers or web applications.
Pros
- Automates the process of capturing screenshots and gathering information from multiple web targets
- Generates well-organized HTML reports for easy analysis and presentation
- Supports various protocols including HTTP, HTTPS, and RDP
- Includes features for identifying default credentials on web applications
Cons
- May trigger security alerts or be blocked by some web application firewalls
- Can be resource-intensive when scanning large numbers of targets
- Requires proper setup and dependencies, which might be challenging for some users
- Limited to visual and basic information gathering, not a comprehensive security assessment tool
Getting Started
-
Clone the repository:
git clone https://github.com/RedSiege/EyeWitness.git
-
Navigate to the setup directory:
cd EyeWitness/Python/setup
-
Run the setup script for your operating system (e.g., for Kali Linux):
./setup.sh
-
Run EyeWitness with a file containing URLs:
cd .. ./EyeWitness.py -f urls.txt --web
This will scan the URLs listed in urls.txt
, capture screenshots, and generate an HTML report in the default output directory.
Competitor Comparisons
EyeWitness is designed to take screenshots of websites, provide some server header info, and identify default credentials if possible.
Pros of EyeWitness
- Comprehensive web application reconnaissance tool
- Captures screenshots and generates reports for easy analysis
- Supports various protocols including HTTP, HTTPS, and RDP
Cons of EyeWitness
- May require additional dependencies for full functionality
- Can be resource-intensive when scanning large networks
- Learning curve for advanced features and customization
Code Comparison
EyeWitness:
def create_driver(browser, resolution, user_agent):
if browser == "chrome":
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--ignore-certificate-errors")
chrome_options.add_argument("--ignore-ssl-errors")
chrome_options.add_argument("--headless")
chrome_options.add_argument("--window-size=" + resolution)
if user_agent:
chrome_options.add_argument("--user-agent=" + user_agent)
return webdriver.Chrome(chrome_options=chrome_options)
Both repositories appear to be the same project, as EyeWitness is a single repository. The code snippet above demonstrates how the tool creates a web driver for capturing screenshots and interacting with web applications. It supports various browser options and configurations, allowing for flexibility in reconnaissance tasks.
A Tool for Domain Flyovers
Pros of Aquatone
- Written in Go, making it faster and more efficient for large-scale scanning
- Supports concurrent scanning, allowing for quicker results on multiple targets
- Includes built-in web server for easy viewing of results
Cons of Aquatone
- Less comprehensive reporting compared to EyeWitness
- Fewer customization options for output and scanning parameters
- Limited support for authentication methods
Code Comparison
EyeWitness (Python):
def create_driver(resolution, user_agent, proxy):
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--ignore-certificate-errors")
chrome_options.add_argument("--headless")
chrome_options.add_argument("--window-size={0}".format(resolution))
chrome_options.add_argument("--user-agent={0}".format(user_agent))
if proxy:
chrome_options.add_argument("--proxy-server={0}".format(proxy))
Aquatone (Go):
func takeScreenshot(url string, timeout time.Duration) (*screenshot, error) {
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
task := chromedp.NewContext(ctx)
var buf []byte
if err := chromedp.Run(task, screenshotTasks(url, &buf)); err != nil {
return nil, err
}
return &screenshot{URL: url, Data: buf}, nil
}
Both tools aim to capture screenshots and gather information about web applications, but they differ in implementation language and specific features. EyeWitness offers more detailed reporting and customization, while Aquatone focuses on speed and concurrent scanning capabilities.
🔍 gowitness - a golang, web screenshot utility using Chrome Headless
Pros of gowitness
- Written in Go, offering better performance and easier deployment
- Supports concurrent scanning, potentially faster for large-scale operations
- Includes built-in web server for viewing results
Cons of gowitness
- Less extensive reporting options compared to EyeWitness
- May have fewer customization options for screenshots
- Lacks some advanced features like clustering similar pages
Code Comparison
EyeWitness (Python):
def create_driver(resolution, user_agent, proxy_server):
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--ignore-certificate-errors')
chrome_options.add_argument('--test-type')
chrome_options.add_argument('--headless')
return webdriver.Chrome(chrome_options=chrome_options)
gowitness (Go):
func (c *Chrome) Setup() error {
opts := append(chromedp.DefaultExecAllocatorOptions[:],
chromedp.Flag("ignore-certificate-errors", true),
chromedp.Flag("headless", true),
)
allocCtx, cancel := chromedp.NewExecAllocator(context.Background(), opts...)
c.context, c.cancel = chromedp.NewContext(allocCtx)
return nil
}
Both tools use headless browsers for screenshot capture, but gowitness leverages Go's concurrency features for potentially faster execution, while EyeWitness offers more comprehensive reporting and analysis capabilities.
Nmap - the Network Mapper. Github mirror of official SVN repository.
Pros of nmap
- Comprehensive network scanning and discovery tool
- Extensive scripting capabilities for custom scans
- Large, active community and regular updates
Cons of nmap
- Steeper learning curve for advanced features
- Can be resource-intensive for large-scale scans
- Primarily focused on network-level scanning
Code Comparison
nmap
local http = require "http"
local shortport = require "shortport"
local stdnse = require "stdnse"
portrule = shortport.http
action = function(host, port)
local response = http.get(host, port, "/")
return stdnse.format_output(true, response.body)
end
EyeWitness
def create_web_index_head(date):
return """<html>
<head>
<title>EyeWitness Report</title>
<style type='text/css'>
body {margin: 0; padding: 0; background: #FFFFFF; font-size: 13px; font-family: '{font}';}
h1 {font-size: 16px;}
#screenshot {max-width: 850px; max-height: 550px; display: inline-block; float: right;}
#report {width: 100%;}
</style>
</head>
<body>
<h2>EyeWitness Report ({date})</h2>
"""
While nmap focuses on network scanning and port discovery, EyeWitness specializes in web application screenshots and reporting. nmap's code example shows a basic HTTP scan script, while EyeWitness's code demonstrates HTML report generation. Both tools serve different purposes in the security assessment workflow.
TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.
Pros of masscan
- Extremely fast network scanning, capable of scanning the entire Internet in under 6 minutes
- Highly customizable with numerous command-line options for fine-tuning scans
- Supports asynchronous transmission, allowing for increased efficiency
Cons of masscan
- Focused solely on port scanning, lacking the web application analysis capabilities of EyeWitness
- May generate more network traffic and be more easily detected by intrusion detection systems
- Requires more technical expertise to interpret and analyze results compared to EyeWitness's visual output
Code Comparison
masscan:
for (i=0; i<range.count; i++) {
struct Range *r = &range.list[i];
count += r->end - r->begin + 1;
}
EyeWitness:
def create_web_index_head(date):
return """<html>
<head>
<title>EyeWitness Report</title>
"""
The code snippets highlight the different focus areas of the two tools. masscan's C code demonstrates its emphasis on efficient scanning and range calculations, while EyeWitness's Python code shows its focus on generating visual reports for web applications.
A swiss army knife for pentesting networks
Pros of CrackMapExec
- More versatile tool for network penetration testing and lateral movement
- Supports multiple protocols (SMB, WMI, MSSQL, etc.) for comprehensive network enumeration
- Actively maintained with frequent updates and new features
Cons of CrackMapExec
- Steeper learning curve due to its extensive feature set
- May trigger more security alerts due to its active scanning and exploitation capabilities
- Requires more setup and dependencies compared to EyeWitness
Code Comparison
EyeWitness (Python):
def create_web_index_html(web_index):
with open(os.path.join(output_directory, 'index.html'), 'a') as f:
f.write("<br><table border=\"1\">\n")
f.write("<tr><th>Web Request Info</th></tr>\n")
CrackMapExec (Python):
def proto_flow(self, hosts, protocol_db, module, chain=None):
for host in hosts:
if type(host) is str:
host = {
'hostname': host,
'port': protocol_db[module.protocol]['port']
}
Both tools are written in Python, but CrackMapExec's codebase is more complex due to its broader functionality. EyeWitness focuses on web application reconnaissance, while CrackMapExec is designed for network penetration testing across multiple protocols.
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
EyeWitness
EyeWitness is designed to take screenshots of websites provide some server header info, and identify default credentials if known.
EyeWitness is designed to run on Kali Linux. It will auto detect the file you give it with the -f flag as either being a text file with URLs on each new line, nmap xml output, or nessus xml output. The --timeout flag is completely optional, and lets you provide the max time to wait when trying to render and screenshot a web page.
A complete usage guide which documents EyeWitness features and its typical use cases is available here - https://www.christophertruncer.com/eyewitness-2-0-release-and-user-guide/
Windows
Red Siege has created a Windows client (thanks to the massive help of Matt Grandy (@Matt_Grandy_) with the stability fixes). All you need to do is build it locally (or check the releases), and then provide a path to a file containing the URLs you want scanned! EyeWitness will generate the report within your "AppData\Roaming" directory. The latest version of the C# EyeWitness supports parsing and taking screenshots of Internet Explorer and Chrome bookmarks without having to supply a list of URLs. This version is also small enough to be delivered through Cobalt Strike's execute-assembly.
Setup:
- Navigate into the CS directory
- Load EyeWitness.sln into Visual Studio
- Go to Build at the top and then Build Solution if no modifications are wanted
Usage:
EyeWitness.exe --help
EyeWitness.exe --bookmarks
EyeWitness.exe -f C:\Path\to\urls.txt
EyeWitness.exe --file C:\Path\to\urls.txt --delay [timeout in seconds] --compress
Linux
Supported Linux Distros:
- Kali Linux
- Debian 7+ (at least stable, looking into testing) (Thanks to @themightyshiv)
- CentOS 7
- Rocky Linux 8
E-Mail: GetOffensive [@] redsiege [dot] com
Setup:
- Navigate into the Python/setup directory
- Run the setup.sh script
Usage:
./EyeWitness.py -f filename --timeout optionaltimeout
Examples:
./EyeWitness -f urls.txt --web
./EyeWitness -x urls.xml --timeout 8
./EyeWitness.py -f urls.txt --web --proxy-ip 127.0.0.1 --proxy-port 8080 --proxy-type socks5 --timeout 120
Proxy Usage
The best guide for proxying EyeWitness through a socks proxy was made by @raikia and is available here - https://github.com/RedSiege/EyeWitness/issues/458
To install EyeWitness from a system while needing to go through a proxy, the following commands (thanks to @digininja) can be used.
APT
-------
/etc/apt/apt.conf.d/70proxy
$ cat /etc/apt/apt.conf.d/70proxy
Acquire::http::proxy "http://localhost:3128";
Acquire::https::proxy "https://localhost:3128";
Git
-----------------
$ cat ~/.gitconfig
[http]
proxy = http://localhost:3128
Wget
---------------------
$ cat ~/.wgetrc or /etc/wgetrc
use_proxy=yes
http_proxy=127.0.0.1:3128
https_proxy=127.0.0.1:3128
General system proxy
--------------------------------
export HTTP_PROXY=http://localhost:3128
export HTTPS_PROXY=http://localhost:3128
Docker
Now you can execute EyeWitness in a docker container and prevent you from install unnecessary dependencies in your host machine.
Note: execute docker run with the folder path in the host which hold your results (/path/to/results)
Note2: in case you want to scan urls from a file, make sure you put it in the volume folder (if you put urls.txt in /path/to/results, then the argument should be -f /tmp/EyeWitness/urls.txt)
Usage
sudo docker build -t eyewitness
Example #1 -
sudo docker run --rm \
-v /tmp:/Eyewitness/Python/ \
eyewitness --web \
-f /Eyewitness/Python/dns.txt \
--no-prompt \
-d /Eyewitness/Python/report-$(date +'%d-%m-%Y-%H-%M-%S' | sed 's/[-:]/-/g')
And then on your host :
cd /tmp && ls
cd report*
firefox-esr report.html &
Call to Action:
I'd love for EyeWitness to identify more default credentials of various web applications.
As you find a device which utilizes default credentials, please e-mail me the source code of the index page and the default creds so I can add it in to EyeWitness!
Top Related Projects
EyeWitness is designed to take screenshots of websites, provide some server header info, and identify default credentials if possible.
A Tool for Domain Flyovers
🔍 gowitness - a golang, web screenshot utility using Chrome Headless
Nmap - the Network Mapper. Github mirror of official SVN repository.
TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.
A swiss army knife for pentesting networks
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