Coder Social home page Coder Social logo

phishing-hunter / proxypot Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 57 KB

Openproxy型ハニーポット

License: MIT License

Dockerfile 4.39% Shell 3.45% Python 81.93% HTML 10.18% JavaScript 0.05%
honeypot openproxy dionaea malware-research threat-hunting tpot dicom medpot cowrie fail2ban

proxypot's Introduction

openproxy honeypot

OpenProxyのように振る舞うハニーポット
ほとんどの通信がlocalhostへ転送されます

説明スライド

ログ解析ツールはこちら

HTTPプロキシサーバ

asciicast

SSHプロキシサーバ

asciicast

セットアップ方法

証明書の取得

はじめに証明書の取得を行います。
ハニーポットがグローバルIPアドレスを持っていない場合は手順をスキップしてください。

$ docker-compose up -d nginx
$ docker-compose run --rm certbot certonly --webroot -w /var/www/html -d honeypot.local --agree-tos -m [email protected]

設定ファイルをコピー

cp env.template .env
cp honeypot.yaml.sample docker/common/honeypot.yaml

サーバの起動

$ docker-compose up -d --build httpd sshd telnetd socat

動作確認

HTTPサーバの動作を確認します。

curl -XGET localhost:8080
curl -XPOST localhost:8080 -d '{"hoge": "hoo"}'
curl -XPOST localhost:8080 -d "exploit payload > echo hoge| md5sum"
curl -XGET -x http://127.0.0.1:8080 http://example.com
curl -XGET -x http://127.0.0.1:8080 http://example.com/login
curl -XPOST -x http://127.0.0.1:8080 http://example.com -d 'hoge=foo'

以下のファイルにログが記録されます。

cat /data/httpd-honeypot.local.json
{"asctime": "2023-01-08 17:40:00,025", "src_ip": "172.25.0.1", "dst_ip": "example.com", "src_port": 60948, "dst_port": 80, "levelname": "INFO", "message": "proxy POST example.com", "method": "POST", "headers": {"Host": "example.com", "User-Agent": "curl/7.81.0", "Accept": "*/*", "Proxy-Connection": "Keep-Alive", "Content-Length": "8", "Content-Type": "application/x-www-form-urlencoded"}, "body": "", "size": 0, "path": "http://example.com/", "sensor": "honeypot.local", "session": "dfb255d8a50942c19f9e55f5648dc85a"}

踏み台SSHサーバに接続(パスワード: password)

ssh [email protected] -p 2222 -D 9050

SSHサーバを経由してifconfig.ioへ接続する

curl -x socks5h://127.0.0.1:9050 http://ifconfig.io

以下のファイルにログが記録されます。

cat /data/sshd-honeypot.local.json
{"asctime": "2023-01-08 17:23:35,467", "src_ip": "172.25.0.1", "dst_ip": "ifconfig.io", "src_port": 60424, "dst_port": 80, "levelname": "INFO", "message": "check_channel_direct_tcpip_request", "command": "", "username": "root", "password": "password", "chanid": 1, "sensor": "honeypot.local"}

Proxy Checker

ハニーポットを起動したら以下のサイトでチェックします。

http

smtp

proxypot's People

Contributors

phishing-hunter avatar tatsuiman avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.