All Projects → YSc21 → webcocktail

YSc21 / webcocktail

Licence: MIT license
An automatic and lightweight web application scanning tool for CTF.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to webcocktail

Web-Exploitation-Workflow
Web Exploitation Workflow for CTF Challenges
Stars: ✭ 33 (+17.86%)
Mutual labels:  ctf, web-exploitation
Snoop
Snoop — инструмент разведки на основе открытых данных (OSINT world)
Stars: ✭ 886 (+3064.29%)
Mutual labels:  scanner, ctf
Bottleneckosmosis
瓶颈渗透,web渗透,red红队,fuzz param,注释,js字典,ctf
Stars: ✭ 368 (+1214.29%)
Mutual labels:  scanner, ctf
Bscan
an asynchronous target enumeration tool
Stars: ✭ 207 (+639.29%)
Mutual labels:  scanner, ctf
Security Tools
Collection of small security tools, mostly in Bash and Python. CTFs, Bug Bounty and other stuff.
Stars: ✭ 509 (+1717.86%)
Mutual labels:  scanner, ctf
Berserker
A list of useful payloads for Web Application Security and Pentest/CTF
Stars: ✭ 212 (+657.14%)
Mutual labels:  scanner, ctf
core
An advanced and highly optimized Java library to build frameworks: it's useful for scanning class paths, generating classes at runtime, facilitating the use of reflection, scanning the filesystem, executing stringified source code and much more...
Stars: ✭ 100 (+257.14%)
Mutual labels:  scanner
watchman
AML/CTF/KYC/OFAC Search of global watchlist, sanctions, and politically exposed person (PEP)
Stars: ✭ 167 (+496.43%)
Mutual labels:  ctf
fhq-server
This is an open source platform for competitions of computer security.
Stars: ✭ 33 (+17.86%)
Mutual labels:  ctf
sec-scannode
SEC分布式资产扫描系统
Stars: ✭ 8 (-71.43%)
Mutual labels:  scanner
tosh
Imagine your SSH server only listens on an IPv6 address, and where the last 6 digits are changing every 30 seconds as a TOTP code...
Stars: ✭ 406 (+1350%)
Mutual labels:  ctf
ctf writeups
No description or website provided.
Stars: ✭ 25 (-10.71%)
Mutual labels:  ctf
robot hacking manual
Robot Hacking Manual (RHM). From robotics to cybersecurity. Papers, notes and writeups from a journey into robot cybersecurity.
Stars: ✭ 169 (+503.57%)
Mutual labels:  ctf
spellbook
Framework for rapid development and reusable of security tools
Stars: ✭ 67 (+139.29%)
Mutual labels:  ctf
BinV
👓 Yet another binary vulnerbilities checker. An automated vulnerability scanner for ELF based on symbolic execution.
Stars: ✭ 25 (-10.71%)
Mutual labels:  ctf
Document-Scanner-and-OCR
A simple document scanner with OCR implemented using Python and OpenCV
Stars: ✭ 31 (+10.71%)
Mutual labels:  scanner
PSStringScanner
Provides lexical scanning operations on a String
Stars: ✭ 45 (+60.71%)
Mutual labels:  scanner
GitCTF
Git-based CTF
Stars: ✭ 53 (+89.29%)
Mutual labels:  ctf
ctf
CTF programs and writeups
Stars: ✭ 22 (-21.43%)
Mutual labels:  ctf
jfreesane
Java API to talk to the SANE scanning daemon
Stars: ✭ 46 (+64.29%)
Mutual labels:  scanner

WebCocktail

An automatic and lightweight web application scanning tool for CTF. The first thing you may want to do in CTF web problems. It has some features:

  • crawl website
  • show web comments and hidden inputs
  • auto scan hidden files: .git, .svn, robots.txt, flag.php, phpMyAdmin/, ...
  • auto scan tmp files for every page: .index.php.swp, SOME_PAGE.php~, ...
  • fuzz header: X-Forwarded-For, shellshock, ...
  • fuzz parameters: ', ", SOME_PARAM[]=, ...
  • create your own custom plugins
  • colorize information in results
  • diff same url responses
  • interactive mode for manipulating requests / responses

Requirements

python3: pip3 install -r ./requirements.txt

requests==2.13.0
ipython==5.3.0
scrapy==1.3.2

Usage

$ ./webcocktail.py --help
usage: webcocktail.py [-h] [--cookie cookie] [-debug] [--domain [d [d ...]]]
                      [-no-crawl] [-no-i] [-no-scan] [--urls [u [u ...]]]
                      url

An automatic and lightweight web application scanning tool for CTF.

positional arguments:
  url                   a website which you want to analysis

optional arguments:
  -h, --help            show this help message and exit
  --cookie cookie       set default cookie for requests
  -debug                plugins debug mode
  --domain [d [d ...]]  extra carwler doamins
  -no-crawl             without using default crawl
  -no-i                 without ipython interactive mode
  -no-scan              without using default scan plugin (just using ScanFile
                        plugin)
  --urls [u [u ...]]    other pages which you want to crawl

Example

$ ./webcocktail.py http://127.0.0.1/

If you need cookies for login, you can add cookies in --cookie:

./webcocktail.py --cookie PHPSESSID=abc http://127.0.0.1/

Skip plugin / request

You can press CTRL + C to skip the plugin or the request:

2017-02-28 | Scanner        | INFO | Using plugins: [<class 'scan_temp.ScanTemp'>, <class 'fuzz_header.FuzzHeader'>, <class 'fuzz_param.FuzzParam'>]
2017-02-28 | Scanner        | INFO | Using ScanTemp to scan http://127.0.0.1/
^C
Skip this (p)lugin, (r)equest? p
2017-02-28 | Scanner        | WARNING | Skip: Using ScanTemp to scan http://127.0.0.1/

In this example, Skip this (p)lugin means you will skip ScanTemp but still using FuzzHeader and FuzzParam to scan http://127.0.0.1/. Skip this (r)equest means you will skip all plugins to scan http://127.0.0.1/.

Interactive mode

It will pop ipython at the end. You can type results to get all scanned responses (the Response object in requests library).

Sometimes you want to rescan / resend a request:

IPython Interactive Mode!
You can use `wct.show_pages()` to show scanned pages or using `results` to get responses

In [1]: wct.scanner.using
Out[1]: 
[<scan_temp.ScanTemp at 0x7f4efa398438>,
 <fuzz_header.FuzzHeader at 0x7f4efa3a4b70>,
 <fuzz_param.FuzzParam at 0x7f4efa388ba8>]

In [2]: wct.scanner.disuse('all')

In [3]: wct.scanner.using
Out[3]: []

In [4]: wct.scanner.use('FuzzHeader')
2017-02-28 | Scanner        | INFO | Using plugins: [<fuzz_header.FuzzHeader object at 0x7f4efa3a4b70>]

In [5]: wct.scanner.using
Out[5]: [<fuzz_header.FuzzHeader object at 0x7f4efa3a4b70>]

In [6]: wct.scanner.using[0].log.setLevel('DEBUG')  # debug log if you want

In [7]: wct.scanner.scan(results[3].request)
2017-02-28 | Scanner        | INFO | Using FuzzHeader to scan http://127.0.0.1/action_post.php
2017-02-28 | FuzzHeader     | DEBUG | headers: {'Content-Length': '46', 'Accept-Encoding': 'gzip,deflate', 'User-Agent': 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)', 'Referer': 'http://127.0.0.1/', 'Connection': 'keep-alive', 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': '../;q=0.5'}
2017-02-28 | FuzzHeader     | DEBUG | <Response [200]> http://127.0.0.1/action_post.php
...

Out[7]: 
[<Response [200]>,
 <Response [200]>,
 <Response [200]>]

Filter results

The example for finding 'debug.php' in results:

In [1]: def f(response):
   ...:     if 'debug.php' in response.url:
   ...:         return response
   ...:     return None
   ...: 

In [2]: wct.show_pages?
Signature: wct.show_pages(category='all', filter_function=None, **kwargs)
Docstring: <no docstring>
File:      ./webcocktail.py
Type:      method

In [3]: results = wct.show_pages(filter_function=f)

Plugins

All plugins are in ./plugins/ and each plugin will handle a request at a time. All payloads are in ./payloads/ and a plugin will try all payloads in payload_file for a request.

write a plugin

A simple plugin:

./plugins/my_plugin.py
import config
from webcocktail.plugin import Plugin

class MyPlugin(Plugin):
    payload_file = 'payload/my_plugin_payload.txt'

    def tamper_request(self, payload, request):
        request.url += payload
        return request
./payloads/my_plugin_payload.txt
a.php
b.php
# this is comment. it will not be a payload
c.php

If you use this plugin to scan http://127.0.0.1/, it will request http://127.0.0.1/a.php, http://127.0.0.1/b.php and http://127.0.0.1/c.php.

In the simple plugin, we can modify:

  • payload_file will set payload file. Each line in payload_file is a payload and the line started with # will be ignored.
  • tamper_request can add each payload to the request. In this plugin, the parameter payload is a.php, b.php or c.php and request.url is always http://127.0.0.1/. The return value must be a request (python3 requests.PreparedRequest), requests (list) or None. None will not be send.

Other functions:

  • tamper_payload
  • filter_response
  • load_payloads

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].