Sinisterly
Tutorial Protect Process - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework)
+--- Thread: Tutorial Protect Process (/Thread-Tutorial-Protect-Process)

Pages: 1 2 3


RE: Protect Process - Platinum - 07-25-2013

(07-25-2013, 02:27 PM)God Wrote: Create a second program that gets launched when your main program is started.
The new program will check to see if your primary program is open. If it is not, it will open it.
This secondary program should be small enough to avoid suspicion, and this method will be basic enough to avoid detection.

For added security, make both programs check each other. If one is not open, the other will open it. This way, they both have to be closed at the same time, which can be difficult to do.

I think this would do pretty fine against most people.


RE: Protect Process - Madara-Uchiha - 08-05-2013

(08-02-2013, 01:24 AM)aeonhack Wrote: I think this is what you are looking for, just add the code and call BlockAccess().

Code:
<DllImport("advapi32.dll")> _ Private Function GetKernelObjectSecurity( _ ByVal handle As IntPtr, _ ByVal requestedInformation As Integer, _ ByVal data As Byte(), _ ByVal dataLength As Integer, _ ByRef size As Integer) As Boolean End Function <DllImport("advapi32.dll")> _ Private Function SetKernelObjectSecurity( _ ByVal handle As IntPtr, _ ByVal securityInformation As Integer, _ ByVal data As Byte()) As Boolean End Function Function BlockAccess() As Boolean Dim Handle As IntPtr = Process.GetCurrentProcess().Handle Dim Size As Integer GetKernelObjectSecurity(Handle, 4, Nothing, 0, Size) If Not Size > 0 Then Return False Dim Data As Byte() = New Byte(Size - 1) {} If Not GetKernelObjectSecurity(Handle, 4, Data, Data.Length, Size) Then Return False Dim SD As New RawSecurityDescriptor(Data, 0) Dim SI As New SecurityIdentifier(WellKnownSidType.WorldSid, Nothing) Dim Ace As New CommonAce(AceFlags.None, AceQualifier.AccessDenied, 2035711, SI, False, Nothing) SD.DiscretionaryAcl.InsertAce(0, Ace) Data = New Byte(SD.BinaryLength - 1) {} SD.GetBinaryForm(Data, 0) If Not SetKernelObjectSecurity(Handle, 4, Data) Then Return False Return True End Function

Perfect!!
Fianlly!
That was exactly what I was searching for !
No BSOD, But working! Thank you very much, and some +Rep for you!