Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

Let's say we have a desktop application and a web application. The desktop application uploads files to the server using POST requests to the web application.

What are the possibilities (except using certificates and username/password) to find out that the POST request came from our desktop application and not from an attacker? In other words - how to make sure no one is using the upload script to flood the server with malicious files?

share|improve this question
1  
what's preventing you from using a e.g. username/password basic authentication? –  Yoav Aner Apr 17 '12 at 15:35
1  
There is nothing that can stop me except authentication. Well, authentication also doesn't stop me, but at least it reduces attack surface (you have to know the password to send file) and it allows for accountability (you know who misused the application). –  pgolen Apr 17 '12 at 17:37
    
@YoavAner Nothing, I just want to know if there are other approaches giving me some protection. –  bretik Apr 18 '12 at 10:47

1 Answer 1

HTTPS should be the default for everything. You can use a self-signed certificate for FREE, and hard-code the certificate with your desktop client. Anything else would be a serious mistake.

But let me be clear, this doesn't prevent a hacker from gaining access to this interface. Nothing will ever be able do this because the attacker is running your client on his machine and there for has complete control. SSL only protects the data in transit, and makes sure your delivering it to the right person.

share|improve this answer
2  
"Anything else would be a serious mistake" sounds a little harsh. especially without knowing the threat profile. There are literally thousands of websites allowing people to upload files. I don't know how many of them use client or even server-side certificates. Sure, they are exposed to some risks, but I doubt all of them make a serious mistake... –  Yoav Aner Apr 17 '12 at 16:47
    
@Yoav Aner well you can have an insecure file upload, if the files don't matter, i guess its important to note the OP's didn't mention what threats he cared about. –  Rook Apr 17 '12 at 16:48
2  
Exactly. And that's why I think your comment might be a little too harsh without more info. I agree that in some situations it would be a serious mistake not to use SSL + other means of protection, but I would personally think more info is necessary before jumping into any conclusions. –  Yoav Aner Apr 17 '12 at 16:51
    
@Yoav Aner yeah, I disagree and should not spread these toxic ideas. SSL needs to be the default for everything. It consumes basically zero resources and stops a lot of nonsense. –  Rook Apr 17 '12 at 16:53
2  
SSL is a great solution to many problems, but not all. Just saying 'add SSL otherwise it's a serious mistake' is like a doctor giving paracetamol for everything. Sure, it's a great painkiller and helps a lot of people and might even be the right medicine in many cases, but it doesn't mean it will cure the problem. Any good doctor first needs to diagnose the problem, then come up with a solution. Not the other way around. –  Yoav Aner Apr 17 '12 at 17:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.