Giter VIP home page Giter VIP logo

socks-switch's Introduction

透明代理脚本

参考链接:Linux透明代理在红队渗透中的应用

一个支持打点切换出口IP和内网渗透透明代理的脚本。

优点:

  1. 防溯源
  2. 支持无限切换IP
  3. 能够应用于路由器

缺点:

  1. 依赖redsocks

使用规范

Packages

子命令

[*] Usage : ./socks-switch.sh <start | stop | clean | install | uninstall | change IP PORT | pentest IP PORT>
    ./socks-switch.sh start : 启动redsocks,自动设置iptables
    ./socks-switch.sh stop : 停止redsocks,自动清空iptables
    ./socks-switch.sh clean : 清空iptables所有规则
    ./socks-switch.sh install : 安装iptables规则
    ./socks-switch.sh uninstall : 卸载iptables规则
    ./socks-switch.sh change : 改变Socks的IP和端口
    ./socks-switch.sh pentest : 开始内网渗透,传入Socks的IP和端口

打点模式简单使用:

sudo ./socks-switch.sh install
sudo ./socks-switch.sh start

切换至内网模式使用:

sudo ./socks-switch.sh uninstall
sudo ./socks-switch.sh pentest 1.1.1.1 5566

手动指定Socks的IP和端口:

sudo ./socks-switch.sh change 2.2.2.2 7788

配置项

#!/bin/bash
redsocks_bin_path="/usr/bin/redsocks" # redsocks二进制文件路径
redsocks_config_file_path="/etc/redsocks.conf" # redsocks配置文件路径
socks_api_url='http://http.tiqu.alicdns.com/getip3?num=1&type=1&pro=&city=0&yys=0&port=2&time=2&ts=0&ys=0&cs=0&lb=1&sb=0&pb=4&mr=1&regions=&gm=4' # api接口,返回socks5:IP:端口
shell_log_path="/tmp/root-test-socks.log" # 日志文件

socks-switch's People

Contributors

rvn0xsy avatar

Stargazers

 avatar

Watchers

James Cloos 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.