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

Tool Documentation Standards

documentation standards

Documentation standards ensure consistency, clarity, and effectiveness when recording findings during penetration testing engagements. Proper documentation helps security teams track vulnerabilities, communicate issues to stakeholders, and maintain an audit trail ... Read more

Testing Tool Integration

tool integration

Testing tool integration is a critical aspect of cybersecurity assessment that combines various security testing tools to create a more robust and comprehensive penetration testing workflow. Security professionals need efficient ... Read more

Automation Framework Design

automation framework

An automation framework streamlines and standardizes penetration testing processes, making security assessments more efficient and repeatable. Properly designed frameworks reduce manual effort while maintaining testing quality and consistency across different ... Read more

Exploitation Tool Development

tool development

Penetration testing tools require careful development to effectively identify security vulnerabilities in systems and networks. Security professionals need specialized exploitation tools that can safely simulate real-world attacks without causing damage. ... Read more

Security Tool Architecture

tool architecture

Security tool architecture forms the backbone of effective penetration testing, enabling security professionals to systematically probe systems for vulnerabilities. A well-structured security testing toolkit combines reconnaissance tools, vulnerability scanners, exploitation ... Read more

Build Server Security

build security

Security testing of build servers protects the foundation of software development and deployment processes from potential threats and vulnerabilities. Build servers handle sensitive data, access credentials, and control deployment pipelines, ... Read more

Secret Management

secrets management

Secret management stands as a cornerstone of cybersecurity, particularly during penetration testing operations where handling sensitive data requires meticulous care and precision. Penetration testers must safeguard various types of secrets ... Read more

Deployment Security

deployment security

Penetration testing during deployment phases helps organizations identify security vulnerabilities before applications go live. Security teams use automated and manual testing methods to simulate real-world attacks against newly deployed systems ... Read more