温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Enum4linux的优点有哪些

发布时间:2021-10-22 16:55:11 来源:亿速云 阅读:154 作者:iii 栏目:编程语言

这篇文章主要讲解了“Enum4linux的优点有哪些”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Enum4linux的优点有哪些”吧!

Enum4linux的优点有哪些

Enum4linux-ng

Enum4linux-ng是面向安全专业人士和CTF玩家的下一代Enum4linux(一款Windows/Samba枚举工具),并且具备了JSON/YAML导出等附加功能。

该项目中的enum4linux-ng.py是基于Mark Lowe的enum4linux.pl重写的,Mark Lowe之前属于Portcullis实验室,现在任职于Cisco CX安全实验室。而enum4linux.pl则是一个用于从Windows和Samba系统中枚举信息的工具,主要面向的是安全专业人员和CTF玩家。该工具主要是一个封装了Samba工具nmblookup、net、rpcclient和smbclient的工具。

其一,Enum4linux-ng是出于教育目的开发的。其二,我们也是为了解决enum4linux.pl现有的问题才开发Enum4linux-ng的。跟enum4linux.pl相比,Enum4linux-ng不仅包含了原始工具原有的功能,而且还增加了许多特性修改,支持解析Samba工具的所有输出,并允许将所有结果导出为YAML或JSON文件。

功能特性

  • 支持YAML和JSON输出;

  • 颜色丰富的终端输出;

  • 包含了ldapsearch和polenum的原生实现;

  • 支持遗留的SMBv1连接;

  • 自动检测IPC签名支持;

  • “智能”枚举;

  • 支持超时;

  • 支持IPv6;

区别之处

跟原始版本的Enum4linux相比,Enum4linux-ng在某些方面还是有很明显的不同之处。下面是两个最重要的区别:

  • RID循环并不属于默认枚举(-A)进程之中,但是可以使用-R来启用该功能;

  • 参数名有着显著的不同,比如说新版使用的是-A而不是-a;

安装依赖

首先,我们需要安装工具的依赖组件。该工具使用了下列samba客户端工具:

  • nmblookup

  • net

  • rpcclient

  • smbclient

目前,几乎所有的Linux发行版都支持这些工具的运行,包名一般叫smbclient、samba-client或类似的东西。

除此之外,我们还需要下列Python包:

  • ldap3

  • PyYaml

  • impacket

工具安装

广大研究人员可以使用下列命令将该项目源码克隆至本地:

$ git clone https://github.com/cddmp/enum4linux-ng && cd enum4linux-ng

工具运行

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

工具使用

ENUM4LINUX - next generation

 

usage: enum4linux-ng.py [-h] [-A] [-As] [-U] [-G] [-Gm] [-S] [-C] [-P] [-O] [-L] [-I] [-R] [-N] [-w WORKGROUP] [-u USER] [-p PW] [-d] [-k USERS] [-r RANGES] [-s SHARES_FILE] [-t TIMEOUT]

                        [-v] [-oJ OUT_JSON_FILE | -oY OUT_YAML_FILE | -oA OUT_FILE]

                        host

 

This tool is a rewrite of Mark Lowe's enum4linux.pl, a tool for enumerating information from Windows and Samba systems. It is mainly a wrapper around the Samba tools nmblookup, net,

rpcclient and smbclient. Other than the original tool it allows to export enumeration results as YAML or JSON file, so that it can be further processed with other tools. The tool tries to

do a 'smart' enumeration. It first checks whether SMB or LDAP is accessible on the target. Depending on the result of this check, it will dynamically skip checks (e.g. LDAP checks if LDAP

is not running). If SMB is accessible, it will always check whether a session can be set up or not. If no session can be set up, the tool will stop enumeration. The enumeration process can

be interupted with CTRL+C. If the options -oJ or -oY are provided, the tool will write out the current enumeration state to the JSON or YAML file, once it receives SIGINT triggered by

CTRL+C. The tool was made for security professionals and CTF players. Illegal use is prohibited.

 

positional arguments:

  host

 

optional arguments:

  -h, --help         show this help message and exit

  -A                 Do all simple enumeration including nmblookup (-U -G -S -P -O -N -I -L). This option is enabled if you don't provide any other option.

  -As                Do all simple short enumeration without NetBIOS names lookup (-U -G -S -P -O -I -L)

  -U                 Get users via RPC

  -G                 Get groups via RPC

  -Gm                Get groups with group members via RPC

  -S                 Get shares via RPC

  -C                 Get services via RPC

  -P                 Get password policy information via RPC

  -O                 Get OS information via RPC

  -L                 Get additional domain info via LDAP/LDAPS (for DCs only)

  -I                 Get printer information via RPC

  -R                 Enumerate users via RID cycling

  -N                 Do an NetBIOS names lookup (similar to nbstat) and try to retrieve workgroup from output

  -w WORKGROUP       Specify workgroup/domain manually (usually found automatically)

  -u USER            Specify username to use (default "")

  -p PW              Specify password to use (default "")

  -d                 Get detailed information for users and groups, applies to -U, -G and -R

  -k USERS           User(s) that exists on remote system (default: administrator,guest,krbtgt,domain admins,root,bin,none). Used to get sid with "lookupsid known_username"

  -r RANGES          RID ranges to enumerate (default: 500-550,1000-1050)

  -s SHARES_FILE     Brute force guessing for shares

  -t TIMEOUT         Sets connection timeout in seconds (default: 5s)

  -v                 Verbose, show full samba tools commands being run (net, rpcclient, etc.)

  --keep             Don't delete the Samba configuration file created during tool run after enumeration (useful with -v)

  -oJ OUT_JSON_FILE  Writes output to JSON file (extension is added automatically)

  -oY OUT_YAML_FILE  Writes output to YAML file (extension is added automatically)

  -oA OUT_FILE       Writes output to YAML and JSON file (extensions are added automatically)

工具演示样例

在下面的例子中,我们将针对Windows Server 2012 R2进行工具执行测试,使用的是下列命令:

enum4linux-ng.py 192.168.125.131 -u Tester -p 'Start123!' -oY out

创建了一个用户名为“Tester”且密码为“Start123!”的用户账号,防火墙配置为允许访问。枚举完成之后,由于没有指定其他选项,因此该工具将假定-A(其行为类似于enum4linux)选项。-oY选项将所有枚举数据导出为YAML文件,以便进行后续的数据处理。该工具会在开始时自动检测到远程主机上未运行LDAP。因此,它将跳过任何进一步的LDAP检查,而这些检查通常是默认枚举的一部分。

Enum4linux的优点有哪些

第二个例子中,我们将针对Metasploitable2主机进行测试,使用的是下列命令:

enum4linux-ng.py 192.168.125.145 -A -C

这一次我们使用了-A和-C选项,虽然第一个选项的行为类似于enum4linux的-a选项,但第二个选项将启用服务枚举。该工具会自动检测到需要使用的SMBv1。

Enum4linux的优点有哪些

感谢各位的阅读,以上就是“Enum4linux的优点有哪些”的内容了,经过本文的学习后,相信大家对Enum4linux的优点有哪些这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是亿速云,小编将为大家推送更多相关知识点的文章,欢迎关注!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI