Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

94
Views
Upload image without file input

I have to write an application for a course for university, that has certain vulnerabilities to CSRF attacks and then I have to write exploits. Because I'm out of ideas I'm just writing a lightweight clone of Instagram, that is completely vulnerable.

I want to write two exploits. The first should just be liking a post. The second one should upload a new post.

The app commonly uses an input of type file. Here is the problem. Can I somehow replace the file input in the exploit by just putting hardcoded data to the request? Like adding the bytes and the filetype to the request to simulate an existing file?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Can I somehow replace the file input in the exploit by just putting hardcoded data to the request? Like adding the bytes and the filetype to the request to simulate an existing file?

Just to answer the question and not to nag about good and bad practices: You could encode your needed "hardcoded" data as base64 and then programmatically convert it into a 'File' instance (or use it to simulate your file input in some other way).

Check out this question, you will find examples on how to do the conversion: How to convert Base64 String to javascript file object like as from file input form?

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!