enum4linux-ng.py is a rewrite of Mark Lowe’s (former Portcullis Labs now Cisco CX Security Labs) enum4linux.pl, a tool for enumerating information from Windows and Samba systems, aimed for security professionals and CTF players. The tool is mainly a wrapper around the Samba tools nmblookup, net, rpcclient and smbclient.

I made it for educational purposes for myself and to overcome issues with enum4linux.pl. It has the same functionality as the original tool (though it does some things differently).

Other than the original tool it parses all output of the Samba tools and allows to export all findings as YAML or JSON file. The idea behind this is to allow other tools to import the findings and further process them. It is planned to add new features in the future.

Features

  • support for YAML and JSON export
  • colored console output (can be disabled via NO_COLOR)
  • ldapsearch and polenum are natively implemented
  • support for multiple authentication methods
  • support for legacy SMBv1 connections
  • auto detection of IPC signing support
  • ‘smart’ enumeration will automatically disable tests which would otherwise fail
  • timeout support
  • SMB dialect checks
  • IPv6 support (experimental)

Differences

Some things are implemented differently compared to the original enum4linux. These are the important differences

  • RID cycling is not part of the default enumeration (-A) but can be enabled with -R
  • RID cycling can be achieved faster, by grouping multiple SID lookups in the same rpcclient call
  • parameter naming is slightly different (e.g. -A instead of -a)

Credits

I’d like to thank and give credit to the people at former Portcullis Labs (now Cisco CX Security Labs), namely:

  • Mark Lowe for creating the original ‘enum4linux.pl’
  • Richard ‘deanx’ Dean for creating the original ‘polenum’

In addition, I’d like to thank and give credit to:

  • Craig ‘Wh1t3Fox’ West for his fork of ‘polenum’

It was lots of fun reading your code! 🙂

Legal Note

If you use the tool: Don’t use it for illegal purposes.

Run

An example run could look like that:

enum4linux-ng.py -As <target> -oY out

For more information click here.

LEAVE A REPLY

Please enter your comment!
Please enter your name here