Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

95
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda