Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Membuat Anti Debugger pada program [ Vb 6 ]
#1
bila ada yang masih kurang mengerti tentang debug,debugger,debuggin bisa baca ini dulu

Quote:Debugging adalah sebuah metode yang dilakukan oleh para pemrogram dan pengembang perangkat lunak untuk meng-analisa alur kerja program, mencari dan mengurangi bug, atau kerusakan di dalam sebuah program komputer atau perangkat keras sehingga perangkat tersebut bekerja sesuai dengan harapan. Debugging cenderung lebih rumit ketika beberapa subsistem lainnya terikat dengan ketat dengannya, mengingat sebuah perubahan di satu sisi, mungkin dapat menyebabkan munculnya bug lain di dalam subsistem lainnya.

intinya debugger itu membuat program kita engga sesuai alur yang udah kita buat
Correct Me If I Wrong

dah selesai dengan pengertian debugger yuk ke pokok pembahasannya

mungkin agan" kesel banget apabila program yang kita buat di lucuti oknum tak bertanggung jawab
biasanya cracker yang suka kayak gini nih .
nah untuk itu kita perlu memasang security pada program yang kita buat ...

nih ada contoh code anti debug [Anti Debugger] yang sangat sederhana sekali tetapi memiliki manfaat yang besar
cocok untuk kita" belajar

code ini hanya bekerja apabila program yang kita buat telah di run di process :)

* buka microsoft visual basic 6
* lalu di pojok atas kanan ada tulisan Project1 (Project1.vbp) lalu klik kanan
* setelah di klik kanan pilih Project1 Properties > Starup Object Pilih yang Sub Main
* Buat 1 module terserah ingin dinamakan apa module tersebut
* pada form buat 1 button teserah namanya apa
lalu copykan code ini di button tersebut

code untuk button
Code:
unload me end

Lalu copy kan code ini di module yang sudah kita buat ...

Code:
'by mydisha @ hacker - newbie Public Type DEBUG_EVENT dwDebugEventCode As Long dwProcessId As Long dwThreadId As Long DATA(20) As Long 'enough space End Type Declare Function SetEvent Lib "kernel32" (ByVal hEvent As Long) As Long Declare Function ResetEvent Lib "kernel32" (ByVal hEvent As Long) As Long Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long Declare Function OpenEvent Lib "kernel32" Alias "OpenEventA" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As String) As Long Declare Function CreateEvent Lib "kernel32" Alias "CreateEventA" (lpEventAttributes As Any, ByVal bManualReset As Long, ByVal bInitialState As Long, ByVal lpName As String) As Long Public Const SYNCHRONIZE = &H100000 Public Const STANDARD_RIGHTS_REQUIRED = &HF0000 Public Const EVENT_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &H3) Public Const SW_SHOWNORMAL = 1 Public Type PROCESS_INFORMATION hProcess As Long hThread As Long dwProcessId As Long dwThreadId As Long End Type Public Type SECURITY_ATTRIBUTES nLength As Long lpSecurityDescriptor As Long bInheritHandle As Long End Type Public Type STARTUPINFO cb As Long lpReserved As String lpDesktop As String lpTitle As String dwX As Long dwY As Long dwXSize As Long dwYSize As Long dwXCountChars As Long dwYCountChars As Long dwFillAttribute As Long dwFlags As Long wShowWindow As Integer cbReserved2 As Integer lpReserved2 As Byte hStdInput As Long hStdOutput As Long hStdError As Long End Type Public Const INFINITE = &HFFFFFFFF Public Const DBG_CONTINUE = &H10002 Public Const PROCESS_ALL_ACCESS = &H1F0FFF Public Const EXIT_PROCESS_DEBUG_EVENT = 5 Declare Function ContinueDebugEvent Lib "kernel32" (ByVal dwProcessId As Long, ByVal dwThreadId As Long, ByVal dwContinueStatus As Long) As Long Declare Function WaitForDebugEvent Lib "kernel32.dll" (ByRef lpDebugEvent As DEBUG_EVENT, ByVal dwMilliseconds As Long) As Long Declare Function DebugActiveProcess Lib "kernel32" (ByVal dwProcessId As Long) As Long Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (ByVal lpApplicationName As String, lpCommandLine As Any, lpProcessAttributes As Any, lpThreadAttributes As Any, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, lpEnvironment As Any, ByVal lpCurrentDirectory As String, lpStartupInfo As Any, lpProcessInformation As Any) As Long Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long Public Sub Main() 'Work apabila program telah di compile & Di run Dim ret As Long Select Case Command Case "" Dim PIP As PROCESS_INFORMATION Dim SC1 As SECURITY_ATTRIBUTES Dim SC2 As SECURITY_ATTRIBUTES Dim SI As STARTUPINFO SC1.nLength = Len(SC1) SC2.nLength = Len(SC2) SI.cb = Len(sinfo) SI.dwFlags = 1 SI.wShowWindow = 1 Dim RunAgain As String RunAgain = AddSlash(App.Path) & App.EXEName & ".exe Disha" ret = CreateProcess(vbNullString, ByVal RunAgain, SC1, SC2, 0, &H20, 0&, App.Path, SI, PIP) WaitForSingleObject PIP.hProcess, 100 Protect PIP.dwProcessId Case "Disha" 'Start The Program! Dim EV As Long EV = CreateEvent(ByVal 0&, 0, 0, "GO!") Call WaitForSingleObject(EV, INFINITE) CloseHandle EV Form1.Show 'Form1 dapat di ganti dengan nama form yang anda sukai End Select End Sub Function AddSlash(ByVal StrX As String) As String If Right(StrX, 1) <> "" Then AddSlash = StrX & "" End Function Sub Protect(ByVal ProcessId As Long) Call DebugActiveProcess(ProcessId) Dim EVX As Long EVX = OpenEvent(EVENT_ALL_ACCESS, 0, "GO!") SetEvent EVX Dim DBGEVENT As DEBUG_EVENT Do WaitForDebugEvent DBGEVENT, INFINITE Select Case DBGEVENT.dwDebugEventCode Case EXIT_PROCESS_DEBUG_EVENT Dim H As Long H = OpenProcess(PROCESS_ALL_ACCESS, 0, DBGEVENT.dwProcessId) TerminateProcess H, 0 CloseHandle H End End Select Call ContinueDebugEvent(DBGEVENT.dwProcessId, DBGEVENT.dwThreadId, &H10002) Loop End Sub

ini hanyalah program anti debug sederhana semoga bisa membantu agan" Bigsmile
" Stay Hungry, Stay Foolish "
Reply
#2
MantabMantabMantab

Bookmark dolo sob.... Jadi pada inti nya supaya coding vb kita tidak bisa dibajak yoooo.
=================
Bigsmile View Bigsmile
=================
Reply
#3
* hogyz masih bingung dengan yang ini

Case ""
Dim PIP As PROCESS_INFORMATION
Dim SC1 As SECURITY_ATTRIBUTES
Dim SC2 As SECURITY_ATTRIBUTES
Dim SI As STARTUPINFO
SC1.nLength = Len(SC1)
SC2.nLength = Len(SC2)
SI.cb = Len(sinfo)
SI.dwFlags = 1
SI.wShowWindow = 1



Dim RunAgain As String
RunAgain = AddSlash(App.Path) & App.EXEName & ".exe Disha"
ret = CreateProcess(vbNullString, ByVal RunAgain, SC1, SC2, 0, &H20, 0&, App.Path, SI, PIP)
WaitForSingleObject PIP.hProcess, 100
Protect PIP.dwProcessId


Case "Disha"
'Start The Program!
Dim EV As Long
EV = CreateEvent(ByVal 0&, 0, 0, "GO!")
Call WaitForSingleObject(EV, INFINITE)
CloseHandle EV
Form1.Show 'Form1 dapat di ganti dengan nama form yang anda sukai
[Image: logo.png]
Reply
#4
(12-17-2010, 05:24 PM)hogyz Wrote: * hogyz masih bingung dengan yang ini

Case ""
Dim PIP As PROCESS_INFORMATION
Dim SC1 As SECURITY_ATTRIBUTES
Dim SC2 As SECURITY_ATTRIBUTES
Dim SI As STARTUPINFO
SC1.nLength = Len(SC1)
SC2.nLength = Len(SC2)
SI.cb = Len(sinfo)
SI.dwFlags = 1
SI.wShowWindow = 1



Dim RunAgain As String
RunAgain = AddSlash(App.Path) & App.EXEName & ".exe Disha"
ret = CreateProcess(vbNullString, ByVal RunAgain, SC1, SC2, 0, &H20, 0&, App.Path, SI, PIP)
WaitForSingleObject PIP.hProcess, 100
Protect PIP.dwProcessId


Case "Disha"
'Start The Program!
Dim EV As Long
EV = CreateEvent(ByVal 0&, 0, 0, "GO!")
Call WaitForSingleObject(EV, INFINITE)
CloseHandle EV
Form1.Show 'Form1 dapat di ganti dengan nama form yang anda sukai

itu fungsinya gan ...
jadi ini tuh kayak nge buat double thread gan :D
" Stay Hungry, Stay Foolish "
Reply
#5
nice share aja gan MantabMantab
msh sama sprt dlu kagak ngerti VB
Reply
#6
(12-17-2010, 10:02 PM)Sidom Wrote: nice share aja gan MantabMantab
msh sama sprt dlu kagak ngerti VB

belajar dong om sidom Bigsmile
" Stay Hungry, Stay Foolish "
Reply
#7
nice share
01101101 01100001 01111000 01101001 01101101 01110101 01110011 00111001 00111001 00111001
Reply
#8
iya om ...
silahkan di gunakan codenya :D
" Stay Hungry, Stay Foolish "
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [ VB.NET ] Koneksi database mysql online & membuat fitur login, registrasi online mydisha 15 224 09-26-2014, 06:12 AM
Last Post: mydisha
  [SHARE] Source Code Anti Virus VB6 Jacket^Cyber 6 83 07-31-2014, 10:03 PM
Last Post: sohai
  Cara Membuat HWID Checker Sendiri Ryanz San Rakagi 10 333 06-12-2014, 07:00 PM
Last Post: arjuna
  Membuat desktop locker menggunakan vb6 Nandha689 32 824 06-12-2014, 05:48 AM
Last Post: prezentysostrajazda
  [ask] cara membuat "program jalan sendiri jika mouse tidak bergerak" (VB6) Aceh Cyber Team 2 73 06-11-2014, 07:46 PM
Last Post: Aceh Cyber Team
  [VB 6] Membuat Phising Aplication mydisha 96 5,389 02-16-2014, 10:06 AM
Last Post: Aceh Cyber Team
  Membuat Applikasi billing tanpa server dengan vb 6.0 novaldoankaja 5 121 01-06-2014, 08:18 PM
Last Post: biray hacker
  Cara Membuat Form Splash Sederhana Dengan VB6.0 AgamBastard 7 133 12-27-2013, 01:57 PM
Last Post: nesta
  [Update] Program Penambah Followers Twitter VB6 k1r4 28 904 12-16-2013, 05:56 PM
Last Post: TrubleMarker
  (Tutor)Membuat Browser Sederhana dengan VB 6 Hab1b 9 278 11-28-2013, 05:00 PM
Last Post: Jacket^Cyber

Forum Jump:


Users browsing this thread: 1 Guest(s)