开源php蜜罐,基于Apache 2的蜜罐以及Apache 2服务器的检测模块

StrutsHoneypot

Cymmetria Research, 2017.

Written by: Nir Krakowski (@nirkrakowksi), Imri Goldberg (@lorgandon)

StrutsHoneypot is an Apache 2 based honeypot that includes a seperate detection module (apache mod) for Apache 2 servers that detects and/or blocks the sturts CVE 2017-5638 exploit. It is released under the MIT license for the use of the community.

Please consider trying out the MazeRunner Community Edition, the free version of our cyber deception platform.

https://community.cymmetria.com/

Honeypot Installation, Running and Monitoring

Now with added support (Honeypot only) for content disposition filename parsing vulnerability.

Installation (Ubuntu)

apt-get update

apt-get install docker.io

docker build -t struts_honeypot strutspot_docker/

Running the Honeypot

docker run -p 80:80 --name "mystrutspot_docker" -d struts_honeypot

Accessing the logs

Run 'docker ps' to validate the docker name: "mystrutspot_docker"

Then run 'docker exec -t -i mystrutspot_docker cat /var/log/apache2/error.log'

Testing

Prerequisites

apt-get install python2.7 python-pip

pip install requests

Rebuilding the Honeypot

docker kill mystrutspot_docker docker rm mystrutspot_docker docker build -t struts_honeypot strutspot_docker/

Then use test-struts2.py like below:

Usage:

./test-struts2.py

e.g: ./test-struts2.py http://localhost/

This will test for both vulnerabilities. You should be able to see

Detailed Info

The Honeypot uses mod_rewrite (see strutspot_docker/src/.htaccess) RewriteRule directive to redirect all requests to the same url. To avoid redirection for cover.css, apache.png, and struts.svg it has seperate rule for it. The Honeypot uses error_log() to send a JSON comment containing the connection info and other data to the apache default error log file. mod_headers is used to avoid default parsing by php for multipart/form-data. so it is modified to mmultipart/form-data before reaching the php parser.

Editing the Honeypot Website

Edit strutspot_docker/src/index.php and related ehtml files to add your own flavor to the honeypot itself. Inside the index.php as <?php code. This code must remain intact, anything else is completely independent and can be modified.

mod_contentrap Installation, and Running

This is a very simple Apache module implementation filter intended for a linux server with a running Apache2 server.

Installing

apt-get install apache2-dev

cd mod_contentrap/

make

make install

Running

server apache2 restart

Testing

One can use the same python test script as before.

Important note

This has currently only been tested on Amazon's Ubuntu 16.04 LTS image, but should work on many other platforms (including previous versions of linux/ubuntu).

See also

Check out our Mirai honeypot (MTPot):

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值