c# - How to get strings from other processes -


i'm trying make security software in c# monitors words on other processes , act when specific word found. example: application show message box saying "beware viruses!" when other running process contains word "torrent". hope got idea.

update:
oh, , realize yet, it's still crude idea. that's why gave simple example (which know useless on real program).

update 2: why
know software called block free 4. blocks programs contains blacklisted words. it's lightweight software , works well. i'd improve these features , make better program.

this not sound idea, except maybe joke program. absurdly slow, , become classified malicious, useless. however, there @ least educational value in this.

it should possible long running admin. note admin cannot perform action on system processes.

first, need acquire sedebugprivilege. see this example.

then, need enumerate processes. see example: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682623(v=vs.85).aspx

then, use open process on every pid, using process_all_access. if error_access_denied, didn't acquire sedebugprivilege correctly.

use readprocessmemory read process's memory , store in buffer. processes have massive amount of memory , need break chunks. need robust in error handling.

then, scan buffer desired string, , if find it.

you repeat of above every 10 seconds or so.

note: c#, need p-invoke these api's. c# not best language type of nonsense, it's possible... recommend native code, however.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -