溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Enum4linux的優(yōu)點有哪些

發(fā)布時間:2021-10-22 16:55:11 來源:億速云 閱讀:165 作者:iii 欄目:編程語言

這篇文章主要講解了“Enum4linux的優(yōu)點有哪些”,文中的講解內(nèi)容簡單清晰,易于學習與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學習“Enum4linux的優(yōu)點有哪些”吧!

Enum4linux的優(yōu)點有哪些

Enum4linux-ng

Enum4linux-ng是面向安全專業(yè)人士和CTF玩家的下一代Enum4linux(一款Windows/Samba枚舉工具),并且具備了JSON/YAML導出等附加功能。

該項目中的enum4linux-ng.py是基于Mark Lowe的enum4linux.pl重寫的,Mark Lowe之前屬于Portcullis實驗室,現(xiàn)在任職于Cisco CX安全實驗室。而enum4linux.pl則是一個用于從Windows和Samba系統(tǒng)中枚舉信息的工具,主要面向的是安全專業(yè)人員和CTF玩家。該工具主要是一個封裝了Samba工具nmblookup、net、rpcclient和smbclient的工具。

其一,Enum4linux-ng是出于教育目的開發(fā)的。其二,我們也是為了解決enum4linux.pl現(xiàn)有的問題才開發(fā)Enum4linux-ng的。跟enum4linux.pl相比,Enum4linux-ng不僅包含了原始工具原有的功能,而且還增加了許多特性修改,支持解析Samba工具的所有輸出,并允許將所有結果導出為YAML或JSON文件。

功能特性

  • 支持YAML和JSON輸出;

  • 顏色豐富的終端輸出;

  • 包含了ldapsearch和polenum的原生實現(xiàn);

  • 支持遺留的SMBv1連接;

  • 自動檢測IPC簽名支持;

  • “智能”枚舉;

  • 支持超時;

  • 支持IPv6;

區(qū)別之處

跟原始版本的Enum4linux相比,Enum4linux-ng在某些方面還是有很明顯的不同之處。下面是兩個最重要的區(qū)別:

  • RID循環(huán)并不屬于默認枚舉(-A)進程之中,但是可以使用-R來啟用該功能;

  • 參數(shù)名有著顯著的不同,比如說新版使用的是-A而不是-a;

安裝依賴

首先,我們需要安裝工具的依賴組件。該工具使用了下列samba客戶端工具:

  • nmblookup

  • net

  • rpcclient

  • smbclient

目前,幾乎所有的Linux發(fā)行版都支持這些工具的運行,包名一般叫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進行工具執(zhí)行測試,使用的是下列命令:

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

創(chuàng)建了一個用戶名為“Tester”且密碼為“Start123!”的用戶賬號,防火墻配置為允許訪問。枚舉完成之后,由于沒有指定其他選項,因此該工具將假定-A(其行為類似于enum4linux)選項。-oY選項將所有枚舉數(shù)據(jù)導出為YAML文件,以便進行后續(xù)的數(shù)據(jù)處理。該工具會在開始時自動檢測到遠程主機上未運行LDAP。因此,它將跳過任何進一步的LDAP檢查,而這些檢查通常是默認枚舉的一部分。

Enum4linux的優(yōu)點有哪些

第二個例子中,我們將針對Metasploitable2主機進行測試,使用的是下列命令:

enum4linux-ng.py 192.168.125.145 -A -C

這一次我們使用了-A和-C選項,雖然第一個選項的行為類似于enum4linux的-a選項,但第二個選項將啟用服務枚舉。該工具會自動檢測到需要使用的SMBv1。

Enum4linux的優(yōu)點有哪些

感謝各位的閱讀,以上就是“Enum4linux的優(yōu)點有哪些”的內(nèi)容了,經(jīng)過本文的學習后,相信大家對Enum4linux的優(yōu)點有哪些這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關知識點的文章,歡迎關注!

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。

AI