Evil-WinRM Usage Guide

Evil-WinRM provides penetration testers with a powerful command-line tool for remotely managing Windows systems through WinRM (Windows Remote Management).

Getting Started with Evil-WinRM

Installation is straightforward using Ruby’s package manager: gem install evil-winrm.

Basic Connection Syntax

evil-winrm -i TARGET_IP -u USERNAME -p PASSWORD

Key Features

  • Upload/download functionality
  • PowerShell script loading
  • Built-in menu system
  • SSL/TLS support
  • Pass-the-hash capability

Common Usage Examples

Action Command
Basic Connection evil-winrm -i 10.10.10.10 -u Administrator -p 'Password123'
Pass-the-Hash evil-winrm -i 10.10.10.10 -u Administrator -H 'hash_here'
SSL Connection evil-winrm -i 10.10.10.10 -u Administrator -p 'Password123' -S

Useful Tips

  • Use menu command to access built-in scripts
  • Upload files with upload local_file remote_destination
  • Download files using download remote_file local_destination
  • Load PowerShell scripts with load script.ps1

Security Considerations

  • Always use SSL/TLS when possible
  • Change default WinRM ports for better security
  • Monitor WinRM connections in logs
  • Use strong passwords and rotate them regularly

For updates and documentation, visit the official GitHub repository at https://github.com/Hackplayers/evil-winrm.

Report bugs or security issues to the project maintainers through GitHub Issues.

Compatibility

  • Works with Windows 7/Server 2008 R2 and later
  • Requires Ruby 2.3+
  • Supports most Linux distributions

Note: Evil-WinRM should only be used on systems and networks where you have explicit permission to conduct security testing.

Advanced Features

Evil-WinRM extends beyond basic remote management with advanced capabilities for security testing and system administration.

Script Integration

  • Custom PowerShell scripts can be loaded on-demand
  • Support for both local and remote script execution
  • Donut integration for .NET assemblies
  • Memory injection capabilities

Session Management

Multiple connection options provide flexibility for different scenarios:

  • Session persistence across reconnections
  • Command history preservation
  • Custom timeout configurations
  • Proxy support for complex networks

Troubleshooting

Common Issues and Solutions

Issue Solution
Connection Refused Verify WinRM service is running and ports are open
Authentication Failed Check credentials and ensure proper formatting
SSL Certificate Errors Use proper certificate or disable SSL verification for testing

Conclusion

Evil-WinRM stands as a robust tool for Windows remote management, particularly valuable for security professionals and system administrators. Its combination of built-in features, security options, and ease of use makes it essential for authorized security testing and system administration tasks.

Success with Evil-WinRM requires:

  • Understanding of Windows remote management concepts
  • Proper security precautions and authorization
  • Regular updates and documentation review
  • Compliance with security policies and regulations

FAQs

  1. What is Evil-WinRM and what is its primary purpose?
    Evil-WinRM is a penetration testing tool that uses Windows Remote Management (WinRM) protocol to remotely connect to Windows machines. It provides a command-line interface for performing post-exploitation activities on Windows systems.
  2. What are the prerequisites for using Evil-WinRM?
    Evil-WinRM requires Ruby to be installed on the attacking machine, WinRM service to be enabled on the target Windows system (typically port 5985 for HTTP or 5986 for HTTPS), and valid credentials or a hash for authentication.
  3. How do I install Evil-WinRM?
    Evil-WinRM can be installed using the command: gem install evil-winrm. It comes pre-installed on Kali Linux and can also be installed through git clone from the official repository.
  4. What is the basic syntax for connecting to a target using Evil-WinRM?
    The basic syntax is: evil-winrm -i [TARGET_IP] -u [USERNAME] -p [PASSWORD]. For hash-based authentication, use -H flag instead of -p.
  5. Can Evil-WinRM bypass Windows Defender and other antivirus solutions?
    Evil-WinRM includes built-in AMSI bypass and other evasion techniques, but success depends on the target’s security configuration and antivirus solutions in place.
  6. How can I upload and download files using Evil-WinRM?
    Use the upload command to transfer files from attacker to target: upload local_file remote_destination. Use download for the reverse: download remote_file local_destination.
  7. What are Evil-WinRM’s menu and services commands used for?
    The menu command displays available built-in scripts and tools. The services command lists Windows services on the target machine and can be used for privilege escalation reconnaissance.
  8. How can I execute PowerShell scripts through Evil-WinRM?
    Scripts can be executed using -e for encoded commands, or by loading scripts into memory using the -s flag during connection. Local scripts can also be executed using the upload command followed by PowerShell execution.
  9. What should I do if I encounter SSL/TLS certificate errors?
    Use the -S flag to force SSL/TLS encryption, and -k to ignore SSL certificate validation if you encounter certificate-related errors.
  10. How can I maintain persistence using Evil-WinRM?
    Evil-WinRM can be used to create scheduled tasks, modify registry keys, or create new user accounts, but these actions should be performed only with proper authorization during penetration testing.
Editor
Author: Editor

Related Posts

Program Selection

program selection

Selecting the right programs and tools for penetration testing requires careful consideration of your specific testing requirements, target environment, and skill level. A well-chosen toolkit enables security professionals to effectively ... Read more

Platform Comparisons

platform comparison

Security testing tools come in various forms, with each platform offering unique advantages for penetration testing. Selecting the right platform impacts testing effectiveness, speed, and ability to detect vulnerabilities. This ... Read more

Exercise Documentation

exercise documentation

Exercise documentation represents a critical element of penetration testing that helps maintain organization, track findings, and create detailed reports. Proper documentation enables teams to replicate tests, validate results, and provide ... Read more

Team Collaboration

team collaboration

Team collaboration stands as a cornerstone of successful penetration testing, where security professionals work together to identify and exploit vulnerabilities in target systems. Security teams must coordinate their efforts efficiently, ... Read more

Metrics and Measurement

security metrics

Measuring the success and impact of penetration testing requires a clear set of metrics and benchmarks. Security teams need quantifiable data to demonstrate the value of their pentesting programs and ... Read more

Feedback Loops

Feedback loops in penetration testing represent the continuous cycle of testing, analyzing, and improving security measures to protect systems and networks. Understanding these loops helps security professionals identify vulnerabilities faster ... Read more

Defense Validation

defense validation

Defense validation through penetration testing helps organizations identify and fix security vulnerabilities before malicious actors can exploit them. Professional penetration testers simulate real-world attacks using the same tools and techniques ... Read more

Attack Simulation

attack simulation

Attack simulation and penetration testing help organizations identify security vulnerabilities before malicious actors can exploit them. Security teams use these controlled attacks to evaluate system defenses, test incident response procedures, ... Read more