Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add finereport-sqli-file-upload.yaml #10369

Merged

Conversation

adeljck
Copy link
Contributor

@adeljck adeljck commented Jul 24, 2024

Template / PR Information

FineReport-sqli-file-upload

Template Validation

I've validated this template locally?

  • ✅ YES
  • NO

Additional Details (leave it blank if not applicable)

fofa-query: app="帆软-FineReport"

Additional References:

@DhiyaneshGeek DhiyaneshGeek self-assigned this Jul 24, 2024
@DhiyaneshGeek
Copy link
Member

Hi @adeljck

Is it possible share some reference link to this POC ?

Thanks

@adeljck
Copy link
Contributor Author

adeljck commented Jul 24, 2024

add a link about this vuln
check pls
thanks

@DhiyaneshGeek
Copy link
Member

DhiyaneshGeek commented Jul 24, 2024

Hi @adeljck

This looks like a authenticated template, by seeing the cookie headers in the request

can you update the template accordingly

Join our discord server and send a DM (#geekfreak) my username

Thanks

@adeljck
Copy link
Contributor Author

adeljck commented Jul 24, 2024

first request with 302 not means it's need a auth
if the sql we filled in run success,the respones header will heave a Loacation field,with "n=true"
image
how many sql you fill in,how many "true" you will see in Location field
image
image

@DhiyaneshGeek
Copy link
Member

Hi @adeljck

GET /webroot/scripts/js/{{filename}}.jsp 

With the second request the file will be accessible ?

will there be any content to match in the second response body , it will help full if you can share the debug data

Thanks

@adeljck
Copy link
Contributor Author

adeljck commented Jul 24, 2024

yes,because it looks like a mysql write file vuln or redis unauth file write vuln ,an abnormal jsp file will generate in specific directory. when you access it ,it will return 500,but file is created.
if system deploy in a linux ,you can use this to write a cron to reserve a shell.
it also can write a webshell,but i still reasearch it now.

file content
image
image
because use sqlite library,and do not check paramater t and n,so attacker can execute sql to write a file to a specific location

@DhiyaneshGeek
Copy link
Member

Hi @adeljck

i have found a valid non-intrusive endpoint, where we can confirm the rce vulnerability

Let me know if this changes works

Thanks

@DhiyaneshGeek DhiyaneshGeek added Done Ready to merge good first issue Good for newcomers and removed waiting for more info labels Jul 24, 2024
@DhiyaneshGeek DhiyaneshGeek requested a review from pussycat0x July 24, 2024 14:19
@adeljck
Copy link
Contributor Author

adeljck commented Jul 24, 2024

The jsp file names are randomized and the files are written in a static resource directory. A normally running site will not store jsp files inside this directory

@DhiyaneshGeek
Copy link
Member

Hi @adeljck

Mostly we try to find a non-intrusive way of template

Does the above changes works at your end ?

Hello @adeljck , thank you so much for sharing this template with the community and contributing to this project 🍻

You can grab some cool PD stickers over here http://nux.gg/stickers 😄

@adeljck
Copy link
Contributor Author

adeljck commented Jul 24, 2024

I'll make some changes. Wait a minute.

@DhiyaneshGeek
Copy link
Member

Hi @adeljck , hope it's not file upload again 👀

@adeljck
Copy link
Contributor Author

adeljck commented Jul 24, 2024

Fix it to non-intrusive way

@DhiyaneshGeek
Copy link
Member

Hi @adeljck

the SSTI payload was easy to understand to the user which i added earlier

i'm marking this on hold for my Team Members to Review Further cc @princechaddha

Thanks for sharing the details

@DhiyaneshGeek DhiyaneshGeek added Status: On Hold Similar to blocked, but is assigned to someone and removed Done Ready to merge labels Jul 24, 2024
@adeljck
Copy link
Contributor Author

adeljck commented Aug 30, 2024

it's still on hold,is there still have any question with this file?

@DhiyaneshGeek
Copy link
Member

Hi @adeljck

we are sticking with the non intrusive payload the SSTI method

i'm reverting back the changes

Let me know if you have any queries

@DhiyaneshGeek DhiyaneshGeek requested review from ritikchaddha and removed request for pussycat0x August 30, 2024 07:41
@DhiyaneshGeek DhiyaneshGeek added Done Ready to merge and removed Status: On Hold Similar to blocked, but is assigned to someone labels Aug 30, 2024
@ritikchaddha ritikchaddha merged commit f05efa1 into projectdiscovery:main Sep 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Done Ready to merge good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants