I'm studying application security and now I have a question which I couldn't find a good answer.

Assume I have a vulnerable desktop application in my virus-free windows 7 PC. Let's say when the file size > 10 MB, it causes to an exception in notepad.(just an assumption, you might suggest another scenario). Who is the potential attacker and how is s/he going to hack it? I mean will he attack over the Internet somehow or will some virus use notepad for privilege escalation or something else? What are the possible attack scenarios? Whom should I save the PC from?

  • the question is not clear, you want know which attack can be done with your mentioned scenario? or you want know which type of attack are there related to any desktop application?
    – Ali
    Commented May 1, 2015 at 18:46
  • any kind of of attack related to desktop application is acceptable. I gave it as an example. If you give general view about attacks to desktop applications it would be better.
    – smttsp
    Commented May 1, 2015 at 18:49
  • Simple: convince you to open crafted file. Put shellcode in file and ensure that it's exactly what'll be executed when you open the file. Reap the benefits of a fully privileged application doing all that your session can do. Desktop security is still terrible, and too few applications are sandboxed (and, albeit this is still to be formally proved, I have a strong assumption that many apps are unsandboxable because of the process in which sandboxes are developed). Commented May 1, 2015 at 21:19
  • I'm feeling too lazy to type a full-blown answer but do look at security.stackexchange.com/questions/65485/… and security.stackexchange.com/questions/63097/… Commented May 1, 2015 at 21:19

3 Answers 3


Whom should I save the pc from?

If the desktop application is not listening on a port, it means if there is a potential vulnerability, it can only be exploited locally. The attacker might have exploited another vulnerability and now looking for privilege escalation or persistence. Don't always assume a vulnerable desktop application would result in privilege escalation though. It depends on the vulnerability itself. For example, if the application is running with standard user privileges, even if the attacker exploits it in some way (e.g. buffer overflow, arbitrary file access etc), it won't normally result in privilege escalation. If the application is running with administrative or more privileges, then any vulnerability in the application would result in attacker gaining the same privileges the application is running with.

  • Most non-corporate desktops (and many corporate ones) are run by a single user, and the attacker might not need administrative privileges to monetize their attack. Scraping your files is already very valuable. Besides Linux and OSX users, and all the users who disable UAC, are unprotected from keyloggers, "replacement" rogue apps, etc. and there probably are ways even with UAC to leave some code running behind (possibly as simple as leaving the app running as a daemon and changing its config files to re-exploit it on start up). Commented May 1, 2015 at 21:22
  • @SteveDL You are absolutely right. Gaining administrative or system (even DA) privilege is no more the goal of any attacker. The objective is only to gain access to the data and that can be achieved easily. There are also additional indirect attack surfaces as well (e.g. hard coded credentials in the exe which works on other machines etc). OP asked from whom he needs to to protect the application and the simple answer is the user no matter what their intent. Thanks for your valuable input.
    – void_in
    Commented May 2, 2015 at 7:43
  • I feel we're misunderstanding each other. I did not mean that as a sysadmin, OP should only protect the system from its users. What does that even mean, forbid access to the machine? Evidently if the apps are installed and used it's because the users might need them to be productive, hence the solution cannot be to get in their way. Look up discovery.ucl.ac.uk/20247 and discovery.ucl.ac.uk/1424472. A less disruptive solution could be to isolate risky apps from one another and/or to isolate sensitive documents and make them accessible on a per-need basis. Commented May 2, 2015 at 11:58
  • Also, I forgot discovery.ucl.ac.uk/1426546 which explains why users won't comply if you treat them as enemies. Commented May 2, 2015 at 12:02
  • By protection I didn't mean to lock it. Protection means to make sure the application is only used in an intended way. Whatever protection we put in place in an application such as protection against bof, authentication, authorization etc, it is for both legitimate as well as malicious users. Protection should always be independent of the particular set of users due to the fact that the same users can perform malicious tasks as well. That is why I said protect (from malicious usage) the desktop application from everyone. Hope it is clear now.
    – void_in
    Commented May 2, 2015 at 14:01

Let's suppose a >10mb file opened in notepad causes a buffer overflow and somehow the instruction pointer is set to a location inside that buffer. Somebody could create a maliciously crafted text file which contains shell code at that location inside the text file. You download the text from the internet, put it in notepad and then the malicious program author can execute his code in your environment with the execution rights of the notepad instance you used to open the file.


Usually, the first step is finding and scanning that which port are open , second one(because here is not for learning hack just talk in general): using some application for finding which program are installed on that computer, then finding the exploits on those application and at the end run a specific script on that, such as buffer over-fellow and get privilege.

another way is changing DNS of router to hijacking the user to updating a software, for example notepad++ use it server for updating itself, when DNS changes to fake address that those address is for malicious user, so he can put malware update instead of true software update,then he can exploit the desktop application and then penetrate to the system.

however there are many ways an situation, but the best attacker is whom that is in the network of victim because the easiest way for finding good information about victim PC is MITM attack.

the best way for protection, is use a firewall at least.

  • Thanks for the answer.Is it Nessus, you mentioned by finding the programs installed on that computer? I think it listens to open ports, am I wrong?
    – smttsp
    Commented May 1, 2015 at 19:32
  • @smttsp your welcome ,no some other software in Backtrack Linux.
    – Ali
    Commented May 2, 2015 at 3:09

You must log in to answer this question.

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