0

So i was testing a desktop application for first time and identified a possible endpoint vulnerable to csrf, but the problem i'm facing is that when i try to test it in a browser the request doesn't automatically get any cookies that are needed for the csrf to work.

In summary, is it possible to execute a CSRF attack in a desktop application? if yes, how would it work (add the cookies in the attack)?

1 Answer 1

1

For CSRF to work in a browser, the user needs to be authenticated in the browser. This is generally not the case with non-browser applications where users authenticate in the application, not the browser.

What you would need for a successful CSRF attack in such an application would be to somehow force a user to perform actions using the application.

For example, if the application processes user-supplied links to perform state-changing actions, then CSRF may be possible (see this example for an Android application processing deep links).

4
  • ok i didn't know that, i am curious now on how to get those deeplinks in the desktop application... i don't know where to search Feb 26, 2020 at 12:42
  • @Mr.ToxicMan It really depends on the app if it even uses deeplinks. If it does, you may find links on the applications website, marketing emails, via web searches, etc, by going through the sourcecode (if it's available), etc.
    – tim
    Feb 26, 2020 at 12:48
  • but if it doesn't have deeplinks then there is no way to make a CSRF attack, right? Feb 26, 2020 at 12:53
  • @Mr.ToxicMan It really depends on the application, how it authenticates with the backend server, what functionality it has, etc. If it has a build-in browser, CSRF may be possible. If it renders user-supplied images, it may also be possible. But generally, you would need to look at the application itself in-depth and how it processes input from other users. Just sending requests without a CSRF token is not enough for a desktop application to be vulnerable to CSRF.
    – tim
    Feb 26, 2020 at 12:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .