Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Detecting if programs are running

Hello HF 🤝
i have a simple question for you.

I want to know if applications that are used for debugging and looking into your programs are running

for example, if my program is running and Fiddler is running then close fiddler and my program.
so if Fiddler, Cheat Engine, or other cracky apps are running -> Close.

how would i accomplish that?
Tested and working, upon being ran it will check all processes for a "Bad Program". Once done, it will create two events using the ManagementEventWatcher for when new executables are launched or closed. Just add the names to the List at the bottom of the code. Don't worry about case sensitivity as I have used the extension method ToLower() on them. Make sure you reference System.Management from your Framework Assemblies if you are using a Console Application.

https://pastebin.com/QFUWZMsz
[Image: t4hjwOW.gif]
(Aug 18, 2018 02:43 PM)Lync Wrote:  Tested and working, upon being ran it will check all processes for a "Bad Program". Once done, it will create two events using the ManagementEventWatcher for when new executables are launched or closed. Just add the names to the List at the bottom of the code. Don't worry about case sensitivity as I have used the extension method ToLower() on them. Make sure you reference System.Management from your Framework Assemblies if you are using a Console Application.

hello! thank you for fast response!

i don't want to ask too much, but you don't have a list of "bad" program names by any chance?
(Aug 18, 2018 03:10 PM)ExceptionAmoto Wrote:  hello! thank you for fast response!

i don't want to ask too much, but you don't have a list of "bad" program names by any chance?

No I don't, the name doesn't have to be full/exact, partial names will work. So for example Notepad++ can be "notepad". You will have to run the programs you want to block and see what their process name is. Otherwise you can just guess and write a partial name for it.
[Image: t4hjwOW.gif]
(Aug 18, 2018 03:14 PM)Lync Wrote:  No I don't, the name doesn't have to be full/exact, partial names will work. So for example Notepad++ can be "notepad". You will have to run the programs you want to block and see what their process name is. Otherwise you can just guess and write a partial name for it.

I mean, any experienced user of those kind of applications will see through that immediately and just rename the executable file to something that sounds harmless...
https://github.com/Washi1337

"I'll tell you this UDP joke, and I don't care if you will get it or not."
(Aug 18, 2018 04:07 PM)Washi Wrote:  I mean, any experienced user of those kind of applications will see through that immediately and just rename the executable file to something that sounds harmless...

Obviously, doesn't take a rocket scientist to figure that out.
[Image: t4hjwOW.gif]
is there a way to detect it even if they change the executable name?
(Aug 18, 2018 04:48 PM)ExceptionAmoto Wrote:  is there a way to detect it even if they change the executable name?

Not really, you could look at the assembly information and check for it there.
You are asking to detect a multitude of different programs that serve different purposes. Doing such would require a different technique for each type of program.

For example,
you wouldn't use the detection method for Fiddler too find Cheat Engine as they are two entirely different types of applications with two entirely different purposes.
[Image: t4hjwOW.gif]
is this correct? O.o

[img]http://get.infistar.ban-ned.today/FHf4v8KM/3nsIk3v3o9wsmgVn.png[/img]

Code
private static List<string> badPrograms = new List<string>()
        {
            "Fiddler",
            "Cheat Engine",
            "Dnspy",
            "Wireshark",
            "IDA",
            "reflector",
            "tPeek",
            "ILSpy"
        };
(Aug 20, 2018 01:09 PM)LustWare Wrote:  is this correct? O.o

[img]http://get.infistar.ban-ned.today/FHf4v8KM/3nsIk3v3o9wsmgVn.png[/img]

Code
private static List<string> badPrograms = new List<string>()
       {
           "Fiddler",
           "Cheat Engine",
           "Dnspy",
           "Wireshark",
           "IDA",
           "reflector",
           "tPeek",
           "ILSpy"
       };

The List? What is that screenshot? It doesn't look like a console app which is what I wrote in my code. Also, why are you closing random apps that aren't even in the List lol. Not really sure what you are asking here lol.
[Image: t4hjwOW.gif]
(Aug 20, 2018 01:57 PM)Lync Wrote:  The List? What is that screenshot? It doesn't look like a console app which is what I wrote in my code. Also, why are you closing random apps that aren't even in the List lol. Not really sure what you are asking here lol.


i've made it so it reports back to my backend server each time it closes a app.

and with those settings its closing things at random..

https://pastebin.com/bPv7edVP
(Aug 20, 2018 02:10 PM)LustWare Wrote:  i've made it so it reports back to my backend server each time it closes a app.

and with those settings its closing things at random..

https://pastebin.com/bPv7edVP

I can't reproduce your issue, when running the code that I have sent too OP as administrator it works as intended.
[Image: t4hjwOW.gif]
(Aug 20, 2018 02:26 PM)Lync Wrote:  I can't reproduce your issue, when running the code that I have sent too OP as administrator it works as intended.

well its not actually closing these processes..

but it logs and says that it does.
(Aug 20, 2018 03:05 PM)LustWare Wrote:  well its not actually closing these processes..

but it logs and says that it does.

It does not log that it is closing those types of programs for me. It works entirely as intended for me. Not sure what your issue could be.
[Image: t4hjwOW.gif]
if it's logging that it's closing something and it's not closing it, make sure where you're logging the process name is in the same space as where it actually closes said process.

Sounds to me like you're doing something like

Code
void blah (string ProcessName)
{
if (ProcessName == "blah")
{
    killProcess()
}

console.writeline("killing process" + ProcessName);
}

you might want to check that out

or message me and i'll fix it for you i have nothing else to do today

Inactive, I don't sell products anymore. Please do not message me.
Just here to occasionally lurk.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by daarioJun 9, 2024 04:14 PM 10 301 Jun 9, 2024 04:14 PM
Last Post: Tyr
[C#] by Anon?M IDSep 29, 2018 02:45 PM 8 318 Sep 29, 2018 02:45 PM
Last Post: darkscrpion
[Shell] by ImDeepWithWindowsMay 5, 2018 12:47 PM 2 251 May 5, 2018 12:47 PM
Last Post: ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™