Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mitmproxy: 中间人攻击利器 #206

Open
wsxk opened this issue Aug 27, 2024 · 0 comments
Open

mitmproxy: 中间人攻击利器 #206

wsxk opened this issue Aug 27, 2024 · 0 comments

Comments

@wsxk
Copy link
Owner

wsxk commented Aug 27, 2024

https://wsxk.github.io/mitm/

前情提要

  1. 安装和使用

    1.1 安装
    1.2 使用

  2. 中间人攻击

    2.1 firefox 中间人攻击

前情提要
因为业务需求,需要进行中间人攻击的测试;
在进行中间人攻击时,需要能够绕过TLS协议的加密,解密密文;
还需要进行修改报文,并发送报文
这3个需求让我关注到了mitmproxy,这个被称为地表最强代理的工具

  1. 安装和使用
    1.1 安装
    mitmproxy的安装非常简单,只需要:
    pip install mitmproxy

即可完成安装
1.2 使用
mitmproxy命令行中有很多有用的命令需要使用。

  1. 中间人攻击
    在不同的使用场景下,mitmproxy的使用方法也有所不同
    2.1 firefox 中间人攻击

    使用mitmproxy -p 7788 --set ssl_insecure=true开启代理

    firefox中设置http/https 代理为 127.0.0.1 7788

    访问 http://mitm.it 下载firefox浏览器的证书并安装后即可使用

–set ssl_insecure=true非常重要,内网环境中,服务器可能用的是自签名的证书,如果不设置这个选项,即使完成了步骤,访问服务器也会出现502 bad gateway的情况

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant