Ir al contenido

DMitry

DMitry (Deepmagic Information Gathering Tool) is a comprehensive reconnaissance tool that automates information gathering during the reconnaissance phase of penetration testing. It combines multiple data collection techniques into a single command-line utility, making it ideal for initial OSINT investigations and target profiling.

sudo apt-get update
sudo apt-get install dmitry
wget http://www.deepmagic.com/dmitry/dmitry-1.3.3.tar.gz
tar -xzf dmitry-1.3.3.tar.gz
cd dmitry-1.3.3
./configure
make
sudo make install
dmitry -v
CommandDescription
dmitry [options] targetPrimary syntax for running dmitry
dmitry -hDisplay help menu
dmitry -vShow version information
targetDomain name, IP address, or hostname

WHOIS queries retrieve registrar and registrant information for domain names and IP addresses.

dmitry -w example.com
dmitry -w 192.0.2.1
dmitry -w example.com > whois_results.txt
dmitry -w example.com -o whois_output.txt
dmitry -w -v example.com
FlagFunction
-wPerform WHOIS lookup on target
-o filenameWrite output to specified file
-vVerbose output with additional details

Subdomain enumeration identifies additional subdomains associated with the target domain through various DNS techniques and database queries.

dmitry -s example.com
dmitry -s -v example.com
dmitry -s example.com -o subdomains.txt
dmitry -s example.com > subdomains1.txt
dmitry -s example.net > subdomains2.txt
FlagFunction
-sPerform subdomain search on target
-o filenameSave results to file
-vVerbose mode with detailed enumeration info

Email harvesting extracts email addresses associated with the target domain from public sources and search indexes.

dmitry -e example.com
dmitry -e -v example.com
dmitry -e example.com -o emails.txt
dmitry -e example.com | grep "@example.com"
dmitry -e example.com | sort | uniq
FlagFunction
-ePerform email harvesting on target
-o filenameOutput results to file
-vVerbose output with source information

TCP port scanning identifies open ports and services running on the target system, providing service identification and availability information.

dmitry -p example.com
dmitry -p example.com
dmitry -p -v example.com
dmitry -p example.com
dmitry -p example.com 2>&1 | head -20
FlagFunction
-pPerform TCP port scan on target
-vShow service names and additional details
-o filenameSave scan results to file

OS fingerprinting analyzes network responses and system characteristics to determine the target operating system and version.

dmitry -f example.com
dmitry -f -v example.com
dmitry -f example.com -o fingerprint.txt
FlagFunction
-fPerform OS fingerprinting on target
-vVerbose output with detailed analysis
-o filenameWrite fingerprint results to file

Dmitry’s power comes from combining multiple reconnaissance techniques in a single command, creating comprehensive target profiles.

dmitry -w -s -e -p -f example.com
dmitry -w -s -e -p -f -v example.com
dmitry -w -s -e -p -f -v example.com -o target_profile.txt
dmitry -w -s -e -p -f -v example.com -o target_report.txt 2>&1
for domain in example.com example.net example.org; do
  dmitry -w -s -e -p -f -v $domain -o ${domain}_report.txt
done
CombinationPurpose
-w -sWHOIS + Subdomain enumeration
-s -eSubdomain + Email discovery
-p -fPort scanning + OS fingerprinting
-w -s -e -p -fComplete reconnaissance profile
dmitry -w -s -e -p -f example.com >> reconnaissance.txt
dmitry -w -s -e -p -f -v example.com -o dmitry_$(date +%Y%m%d_%H%M%S).txt
mkdir -p dmitry_results
dmitry -w -s -e -p -f -v example.com -o dmitry_results/example.com_report.txt
dmitry -s example.com | tee subdomains.txt | sort | uniq
# Quick WHOIS and subdomain check
dmitry -w -s example.com
# Complete information gathering
dmitry -w -s -e -p -f -v example.com -o target_complete_recon.txt
# Create target list and run dmitry on each
cat targets.txt | while read target; do
  echo "[*] Gathering information on $target..."
  dmitry -w -s -e -p -f -v $target -o results/${target}_full.txt
  sleep 2  # Rate limiting
done
# Extract all emails for phishing awareness training
dmitry -e example.com | sort | uniq > employee_emails.txt
FlagDescription
-wWHOIS lookup
-sSubdomain enumeration
-eEmail harvesting
-pTCP port scanning
-fOS fingerprinting
-vVerbose output
-o filenameOutput to file
-iDisplay IP address of target
-t numSpecify timeout value (seconds)
-hHelp menu
-vVersion information
dmitry -w example.com
# Review WHOIS registrant data
# Identify administrative contacts
# Note DNS server information
dmitry -p example.com
# Map open ports
# Identify running services
# Note version information
dmitry -e example.com
# Compile email addresses
# Identify department patterns
# Note naming conventions
  • Registrar: Organization handling domain registration
  • Registrant: Domain owner details
  • Administrative Contact: Primary domain administrator
  • Name Servers: DNS infrastructure
  • Registration/Expiration: Domain timeline
  • Valid Subdomains: Confirmed subdomains with DNS records
  • Potential Hosts: Possible subdomains requiring verification
  • Service Subdomains: Mail servers, FTP, web services
  • Domain-based: Emails from primary domain
  • Subdomain-based: Emails from identified subdomains
  • Admin Addresses: Standard administrative emails (admin@, info@)
  • Open Ports: Service ports accepting connections
  • Filtered Ports: Ports behind firewall/filtering
  • Closed Ports: Ports with active rejections
  • Service Names: Identified services on ports
  • Operating System: Identified OS and version
  • System Uptime: Estimated system runtime
  • Running Services: Detected services and versions
  • Rate Limiting: Add delays between scans to avoid detection and server overload
  • Legal Compliance: Ensure proper authorization before scanning
  • Result Organization: Use timestamped output files for tracking changes
  • Target Validation: Verify DNS resolution before running scans
  • Information Correlation: Cross-reference results across all modules for accuracy
  • Iterative Scanning: Perform repeated scans to discover new subdomains and services
  • Note Taking: Document all findings for later analysis and correlation
dmitry -t 30 example.com  # Increase timeout to 30 seconds
dmitry -i example.com  # Display IP address information
nslookup example.com   # Verify DNS resolution
dmitry -v example.com  # Use verbose mode for debugging
# Verify target is accessible and valid
# Check network connectivity
# Add delays between commands
for domain in $(cat domains.txt); do
  dmitry -w -s $domain
  sleep 5
done
  • nmap — Advanced port scanning and OS detection
  • whois — Standalone WHOIS query tool
  • dig/nslookup — DNS query utilities
  • theHarvester — Email and subdomain harvesting
  • Shodan — Internet-wide device search engine