這篇文章主要講解了“Enum4linux的優(yōu)點(diǎn)有哪些”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來(lái)研究和學(xué)習(xí)“Enum4linux的優(yōu)點(diǎn)有哪些”吧!
成都創(chuàng)新互聯(lián)是一家專業(yè)提供蜀山企業(yè)網(wǎng)站建設(shè),專注與成都網(wǎng)站建設(shè)、成都網(wǎng)站制作、H5技術(shù)、小程序制作等業(yè)務(wù)。10年已為蜀山眾多企業(yè)、政府機(jī)構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)網(wǎng)站建設(shè)公司優(yōu)惠進(jìn)行中。
Enum4linux-ng是面向安全專業(yè)人士和CTF玩家的下一代Enum4linux(一款Windows/Samba枚舉工具),并且具備了JSON/YAML導(dǎo)出等附加功能。
該項(xiàng)目中的enum4linux-ng.py是基于Mark Lowe的enum4linux.pl重寫(xiě)的,Mark Lowe之前屬于Portcullis實(shí)驗(yàn)室,現(xiàn)在任職于Cisco CX安全實(shí)驗(yàn)室。而enum4linux.pl則是一個(gè)用于從Windows和Samba系統(tǒng)中枚舉信息的工具,主要面向的是安全專業(yè)人員和CTF玩家。該工具主要是一個(gè)封裝了Samba工具nmblookup、net、rpcclient和smbclient的工具。
其一,Enum4linux-ng是出于教育目的開(kāi)發(fā)的。其二,我們也是為了解決enum4linux.pl現(xiàn)有的問(wèn)題才開(kāi)發(fā)Enum4linux-ng的。跟enum4linux.pl相比,Enum4linux-ng不僅包含了原始工具原有的功能,而且還增加了許多特性修改,支持解析Samba工具的所有輸出,并允許將所有結(jié)果導(dǎo)出為YAML或JSON文件。
支持YAML和JSON輸出;
顏色豐富的終端輸出;
包含了ldapsearch和polenum的原生實(shí)現(xiàn);
支持遺留的SMBv1連接;
自動(dòng)檢測(cè)IPC簽名支持;
“智能”枚舉;
支持超時(shí);
支持IPv6;
跟原始版本的Enum4linux相比,Enum4linux-ng在某些方面還是有很明顯的不同之處。下面是兩個(gè)最重要的區(qū)別:
RID循環(huán)并不屬于默認(rèn)枚舉(-A)進(jìn)程之中,但是可以使用-R來(lái)啟用該功能;
參數(shù)名有著顯著的不同,比如說(shuō)新版使用的是-A而不是-a;
首先,我們需要安裝工具的依賴組件。該工具使用了下列samba客戶端工具:
nmblookup
net
rpcclient
smbclient
目前,幾乎所有的Linux發(fā)行版都支持這些工具的運(yùn)行,包名一般叫smbclient、samba-client或類似的東西。
除此之外,我們還需要下列Python包:
ldap3
PyYaml
impacket
廣大研究人員可以使用下列命令將該項(xiàng)目源碼克隆至本地:
$ git clone https://github.com/cddmp/enum4linux-ng && cd enum4linux-ng
$ ./enum4linux-ng.py -As-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)
在下面的例子中,我們將針對(duì)Windows Server 2012 R2進(jìn)行工具執(zhí)行測(cè)試,使用的是下列命令:
enum4linux-ng.py 192.168.125.131 -u Tester -p 'Start123!' -oY out
創(chuàng)建了一個(gè)用戶名為“Tester”且密碼為“Start123!”的用戶賬號(hào),防火墻配置為允許訪問(wèn)。枚舉完成之后,由于沒(méi)有指定其他選項(xiàng),因此該工具將假定-A(其行為類似于enum4linux)選項(xiàng)。-oY選項(xiàng)將所有枚舉數(shù)據(jù)導(dǎo)出為YAML文件,以便進(jìn)行后續(xù)的數(shù)據(jù)處理。該工具會(huì)在開(kāi)始時(shí)自動(dòng)檢測(cè)到遠(yuǎn)程主機(jī)上未運(yùn)行LDAP。因此,它將跳過(guò)任何進(jìn)一步的LDAP檢查,而這些檢查通常是默認(rèn)枚舉的一部分。
第二個(gè)例子中,我們將針對(duì)Metasploitable2主機(jī)進(jìn)行測(cè)試,使用的是下列命令:
enum4linux-ng.py 192.168.125.145 -A -C
這一次我們使用了-A和-C選項(xiàng),雖然第一個(gè)選項(xiàng)的行為類似于enum4linux的-a選項(xiàng),但第二個(gè)選項(xiàng)將啟用服務(wù)枚舉。該工具會(huì)自動(dòng)檢測(cè)到需要使用的SMBv1。
感謝各位的閱讀,以上就是“Enum4linux的優(yōu)點(diǎn)有哪些”的內(nèi)容了,經(jīng)過(guò)本文的學(xué)習(xí)后,相信大家對(duì)Enum4linux的優(yōu)點(diǎn)有哪些這一問(wèn)題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!