byt3bl33d3r / CrackMapExec

A swiss army knife for pentesting networks
BSD 2-Clause "Simplified" License
8.37k stars 1.64k forks source link

Failure to parse CIDR notation as range #508

Closed capnkrunchy closed 2 years ago

capnkrunchy commented 2 years ago

Describe the bug CME 5.1.7dev attempts to resolve a CIDR range (ex. 192.168.0.0/24) as a hostname and fails to perform any action. The issue is not present in 5.1.1dev.

To Reproduce Steps to reproduce the behavior:

  1. cme --verbose smb 192.168.0.0/24
  2. See error DEBUG Error resolving hostname 192.168.0.0/24: [Errno -2] Name or service not known

Expected behavior CME should parse the CIDR notation as a range and enumerate SMB hosts within the range.

Screenshots image

Crackmapexec info

Additional context Ranges in dash notation (192.168.0.0-255) work as expected.

mpgn commented 2 years ago

Fixed! :)

pip3 install --upgrade crackmapexec