Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [file-upload]

File upload means sending a file from a local system to a remote system such as a server or another client with the intent that the remote system should store a copy of the file being transferred.

0
votes
1answer
25 views

What characters that are converted when running PHP on IIS?

I was reading this article about file upload vulnerability: https://www.owasp.org/index.php/Unrestricted_File_Upload I saw this statement: Finding characters that are converted to other useful ...
0
votes
1answer
36 views

How to securely load data to a database in vendor server such that vendor does not see raw data at all?

Scenario: client will be uploading files with sensitive information to a vendor server for loading into a database. Due to the confidential nature of the files, the client does not want any archiving ...
4
votes
5answers
580 views

How insecure… really… is FTP?

Okay, we know the drill: don't use FTP, use SFTP or FTPS. But what exactly is the risk being posed? The files themselves are sent unencrypted, and this may be fine, or disastrous, depending on what ...
1
vote
2answers
89 views

Directory transversal in PHP with the $_FILES array

I'm working on a php application that is handling file upload. I'm trying to inject a path transversal payload in the filename such as /../../../../etc/. The thing is that the vulnerable line of code ...
-1
votes
3answers
108 views

Is it Unrestricted file upload vulnerability?

I am using a messenger app that's similar to WhatsApp. This app allows me to send any type of files, like Html, Php, SWF etc. via text messages. Is this a vulnerability?
0
votes
1answer
219 views

How exploiting RCE in jpg file actually works?

I am trying to learn how JPG and PNG files can be used to get RCE. Below is my code for uploading files. It will check if the file content type is correct. <?php $test = array('image/jpeg', '...
-5
votes
3answers
178 views

Difference between phpp, php, and phP? [closed]

I came across a ctf challenge where php file upload was restricted but phpp and phP were not. What other formats can php be uploaded in and what is the difference?
1
vote
2answers
174 views

Execute an uploaded php script on a vulnerable server if I know it's location? [closed]

I need to test a website and I found a vulnerable file upload. It is only checked whether or not the file extension is .jpg, .png or .pdf. I can bypass this by uploading a file named script.php.jpg. I ...
2
votes
1answer
170 views

File upload security in webapp - overview of setup

For a webapp based around user uploaded pics, I want to check that I'm doing things sufficiently securely. Below is an outline of the current setup. Of course only registered users can upload, but I ...
0
votes
1answer
59 views

Security risks posed by user generated filenames on a webserver [closed]

Do filenames themselves pose a security risk? We have a webserver, users can upload files to the server. The files are temporarily stored on the server, then moved to S3. The filenames are recorded ...
1
vote
0answers
56 views

How to deny execution of any file on a specific directory?

I built a form that lets the user to upload files to a specific directory (apache2, php). I already limited file type and did some other security things. But I would anyway also like to deny the ...
0
votes
1answer
141 views

Meterpreter file upload - segmentation fault

I'm doing some experiments on two VMs, one running Kali and the other running Ubuntu. I have a problem with the "upload" command of Meterpreter. In particular, I already open a reverse tcp session ...
2
votes
3answers
162 views

Exploiting XSS in filename without using /

I am trying to exploit a vulnerability in the filename field of a file upload. The web application does not properly validate the filename of the uploaded file and as a result there is a stored cross-...
8
votes
2answers
168 views

What are the potential vulnerabilities of allowing a large http body size?

With NGINX and PHP I am allowing 5GB files to be 'uploaded' to my server although they will not be downloaded unless they are 'legitimate' (that is for another question ;)). I was wondering is this is ...
0
votes
0answers
150 views

High false positive rate when scanning uploads with ClamAV

We have an application where a limited circle of users has to upload files, mostly data in an XML format but also human readable text in PDF, Word etc. This is highly sensitive data, so any virus ...
28
votes
8answers
7k views

What security risks are there in allowing someone to upload PHP scripts?

Let's say that a partner wants to upload a PHP script to my Apache server. What kind of mayhem could be caused by this? Which PHP parameters pose threats? If those PHP parameters are fully disabled, ...
5
votes
1answer
74 views

Can Emule MD4 hashes and file sizes be faked?

Please excuse me if I don't use proper terminology, I'm a lawyer and trying to get more information about something my son has pointed out to me. In Germany, law enforcement agencies use enhanced ...
-2
votes
1answer
362 views

Can an XXE attack be carried out from within an docx file? [closed]

Is XXE possible in a file upload with .docx files?
2
votes
3answers
574 views

Susceptibility of 7z encrypted archive files to man in the middle attacks

Given: A file (assume 1 GB in size) is encrypted along with filenames using 7zip into a 7z archive using AES-256 The file is uploaded to a cloud storage service such as those offered by Google, ...
3
votes
1answer
493 views

Unrestricted File upload [closed]

I am working on a file upload feature in our app. Users can also download uploaded files from the app. To prevent malicious file upload, I am checking magic bytes of the file to find the file type ...
2
votes
2answers
78 views

Does opening an arbitrary file in a language (such as Python) pose a security risk?

For example, if a client submits a file to a server, and the server opens the file in read-mode with Python: with open(uploaded_file, "r") as f: # Do something Could the act of opening a file be ...
0
votes
1answer
1k views

Is using enctype=“multipart/form-data” always a bad idea?

If the form doesn't have any file upload, you just use enctype="multipart/form-data" everywhere, is it a bad idea from a security point of view? Here someone says, in 2007 Uusing enctype="...
-3
votes
1answer
347 views

How to execute PHP file after uploading it? [closed]

I have found an endpoint on a website that allow me to upload files. This endpoint didn't have any kind of protection against malicious file upload. So, I uploaded a PHP shell, but the problem is when ...
1
vote
1answer
409 views

Path traversal via filename

Is it possible to perform path traversal by setting the filename of an uploaded path to include a path? Does Windows/Linux/any other operating system allow such filenames? For example, naming a file "...
3
votes
3answers
134 views

Is it safe to accept a file upload without any file extension?

Currently working on a website which allows users to upload data files for automated processing. For both security and user guidance purposes, we implemented an extension whitelist both client and ...
2
votes
1answer
533 views

CSRF attack on file upload functionality

Is it possible to perform CSRF attacks on file upload functionality? My application uploads files by sending multipart/form-data POST requests without any random token. Is it possible to prepare a ...
0
votes
1answer
49 views

File upload functionality - cer format verification

While testing file upload functionality in web application, which allows only .cer files, I found out that it is possible to upload a .cer file where at the end of the file, after „-----END ...
0
votes
3answers
95 views

force uploading a file to a server with an open port [duplicate]

Recently my web server was hacked. someone uploaded a php file manager called extplorer and changed all of my web pages and i was wondering what possible ways they could of uploaded something to my ...
0
votes
2answers
758 views

File upload not checking on mime type

So, I have an upload functionality where extension of the filetype is checked correctly (and not currently bypassable). But the mime type is not checked. Does this leave me with some residual risk or ...
1
vote
2answers
86 views

How to deal with Office documents in file upload?

When creating or testing a file upload functionality how do you deal with Office documents assuming that the client wants to be able to upload .doc/.docx/.xls/.xlsx? I have found quite some reading ...
1
vote
1answer
276 views

Unrestricted file upload - shared file signature

A java application I'm working on has a file upload component, and I want to validate that only certain file types are allowed. I realize checking file extension alone is not sufficiently reliable, so ...
0
votes
2answers
86 views

Should I change format and/or add data to image files in a file upload?

I am designing an image upload platform to my website and was thinking about a few recommendations I found online which were NOT outlined in the OWASP unrestricted file upload list. Those security ...
0
votes
0answers
87 views

nikto vs weird web server behavior

I ran a nikto scan on one web app & noticed nikto was able to identify default login and upload a file with Basic authentication. I checked the logs & find that nikto used PUT method and ...
2
votes
1answer
99 views

Security of assets/media on s3

I got my application written in Flask (Python 3.6) and running on EB. I need to implement content editor which will allow to upload files on server and I would like to store them on s3. Most of ...
1
vote
2answers
91 views

About security of web application - user attached files [closed]

I have a web application (forum software) where I am working on a feature about user attaching files to the forum posts. The application is written in assembly language and the database is SQLite. ...
4
votes
3answers
1k views

Pentesting file upload functionality

I am testing web application which allows to upload files in every format without any restrictions. There is also a function to download uploaded files but when I download file it is returned with ...
3
votes
1answer
91 views

Which is the most recommended way to expose a file to a computer in an external network in a secure way?

I have two machines in an internal network. One is a development server, which is isolated from external communications (neither through HTTP, HTTPS, SSH, etc). The last one is a production server (...
0
votes
3answers
2k views

MIME Type vs. Magic Numbers

I'm interested in a comparison of the two with regards to what's more secure when uploading files on a website (that I'm a programmer for). Mozilla's page about MIME Types states that "On the Web, ...
3
votes
0answers
74 views

How dangerous is it to transmit the last N bytes of a datagram in plaintext?

I'm developing software for a university satellite project, and am currently working on the communications protocols. Here are the restrictions: Radio packets should be assumed to be no larger than ...
3
votes
2answers
80 views

Privacy and File Uploading

Can websites see your computer's directory structure when you upload files through web forms (especially JavaScript)? If so, what are ways to avoid this when uploading?
0
votes
0answers
56 views

Exploiting PUT method in a server to upload a backdoor [duplicate]

I was scanning an OSCP lab machine, and saw this I tried to send a typical put request to test if I can put files on the server through netcat. However, I'm still getting a 404 error when accessing ...
0
votes
2answers
1k views

Wordpress - blocked by firewall for Malicious File Upload

Our work website is getting flooded with these types of hacks: The files are getting uploaded throughout the entire site (not just the url shown in the picture). I our site is still up and running ...
0
votes
2answers
3k views

C# malicious file upload to server

I was joking around with some file-uploads to the server, for the site I was working on. Now it seems to me that we have an enormous security-risk. They don't block any file extensions that are ...
-1
votes
1answer
84 views

Vulnerabilities in PHP Form Handling Script [closed]

I'm writing a PHP script that takes input from an HTML5 form, including uploads, and emails them to an administrator using Magento's mail client. I think I've covered the basics pretty well, but I'm ...
1
vote
3answers
422 views

PHP file upload: Order of security measures

In a PHP file upload form, the name and extension of the file should be changed in order to prevent directory traversal attacks. I don't fully understand these attacks, therefore I'm uncertain if some ...
0
votes
2answers
58 views

Verify software is not harmful before upload to my server? [closed]

I am writing a web application that allows uploading of software to my server for other users to download (file hosting). How can I verify that a program is not harmful before it is uploaded it to my ...
0
votes
2answers
139 views

file transfer/sharing/hosting services: Are the antivirus natively incorporated?

A few days ago, there were a few files that may have been plagued by a virus that I asked my colleague to send me through a file sharing service (here, WeTransfer). The files were sent correctly and ...
0
votes
2answers
55 views

Is no access control on file upload/file download of safe types considered a vulnerability [closed]

Under the theoretical assumption that file uploads were correctly protected (i.e no malicious file types, extensions, scanning etc.), what are the concerns with having no access control on file upload/...
1
vote
1answer
157 views

Serving image from outside web server root

Is storing an image outside of the webserver root with a new name and extension (e.g. using move_uploaded_file($_FILES['userfile']['tmp_name'],'../uploads/'.date('U').'png') - not exactly this, ...
14
votes
7answers
10k views

Keep encrypted files in sync on a cloud service, without having to upload an entire encrypted volume each time

Situation: User has several folders worth of GBs which they want to keep in sync on a cloud service (for example Mega or Dropbox) in an encrypted form; User does not want to sync a single encrypted ...