    {"id":1186,"date":"2021-09-02T02:18:18","date_gmt":"2021-09-02T02:18:18","guid":{"rendered":"http:\/\/student-activity.binus.ac.id\/csc\/?p=1186"},"modified":"2021-09-02T02:18:18","modified_gmt":"2021-09-02T02:18:18","slug":"bypass-302-found-response","status":"publish","type":"post","link":"https:\/\/student-activity.binus.ac.id\/csc\/2021\/09\/bypass-302-found-response\/","title":{"rendered":"Bypass 302 Found Response"},"content":{"rendered":"<p style=\"text-align: justify\"><b>200 OK, 302 Found itu apa?<\/b><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Sebelum kita membahas lebih lanjut, kita perlu mengerti terlebih dahulu apa itu <\/span><em><span style=\"font-weight: 400\">HTTP<\/span><\/em><span style=\"font-weight: 400\"> dan cara kerjanya. <\/span><em><span style=\"font-weight: 400\">HTTP<\/span><\/em><span style=\"font-weight: 400\"> merupakan singkatan dari <\/span><em><span style=\"font-weight: 400\">Hypertext Transfer Protocol<\/span><\/em><i><span style=\"font-weight: 400\">,<\/span><\/i><span style=\"font-weight: 400\"> dimana <\/span><em><span style=\"font-weight: 400\">HTTP<\/span><\/em><span style=\"font-weight: 400\"> adalah sebuah protokol pada <\/span><em><span style=\"font-weight: 400\">application layer<\/span><\/em><span style=\"font-weight: 400\"> yang berguna untuk mentransfer informasi seperti dokumen, file, gambar, dan video antar komputer. Contoh dari penggunaan <\/span><em><span style=\"font-weight: 400\">HTTP<\/span><\/em><span style=\"font-weight: 400\"> adalah komunikasi atau interaksi antara suatu komputer dengan <\/span><em><span style=\"font-weight: 400\">web server<\/span><\/em><span style=\"font-weight: 400\">. Secara singkat, komputer akan mengirimkan <\/span><em><span style=\"font-weight: 400\">HTTP request<\/span><\/em><span style=\"font-weight: 400\"> ke <\/span><em><span style=\"font-weight: 400\">web server<\/span><\/em><span style=\"font-weight: 400\">, lalu <\/span><em><span style=\"font-weight: 400\">web server<\/span><\/em><span style=\"font-weight: 400\"> akan mengembalikan <\/span><em><span style=\"font-weight: 400\">request<\/span><\/em><span style=\"font-weight: 400\"> dalam bentuk <\/span><em><span style=\"font-weight: 400\">HTTP response<\/span><\/em><span style=\"font-weight: 400\">.\u00a0<\/span><\/p>\n<p style=\"text-align: justify\"><em><span style=\"font-weight: 400\">HTTP response<\/span><\/em><span style=\"font-weight: 400\"> sendiri memiliki <\/span><em><span style=\"font-weight: 400\">HTTP response status codes<\/span><\/em><span style=\"font-weight: 400\"> yang telah diatur oleh Internet Assigned Numbers Authority (IANA). <\/span><em><span style=\"font-weight: 400\">HTTP response status codes<\/span><\/em><span style=\"font-weight: 400\"> terdiri dari tiga digit angka yang memiliki arti berbeda-beda pada setiap angkanya. Digit pertama dari <\/span><i><span style=\"font-weight: 400\">HTTP <\/span><\/i><em><span style=\"font-weight: 400\">response status codes <\/span><\/em><span style=\"font-weight: 400\">menunjukkan <\/span><em><span style=\"font-weight: 400\">class<\/span><\/em><span style=\"font-weight: 400\"> dari <\/span><em><span style=\"font-weight: 400\">response<\/span><\/em><span style=\"font-weight: 400\"> dan dua digit setelahnya menunjukkan merupakan pembeda antara <\/span><em><span style=\"font-weight: 400\">status code<\/span><\/em><span style=\"font-weight: 400\"> yang satu dengan yang lainnya. Terdapat lima <\/span><em><span style=\"font-weight: 400\">class<\/span><\/em><span style=\"font-weight: 400\"> atau tipe <\/span><em><span style=\"font-weight: 400\">HTTP response status codes<\/span><\/em><span style=\"font-weight: 400\"><em>,<\/em> yaitu:<\/span><\/p>\n<ul style=\"text-align: justify\">\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">1xx \u2192 informational response, artinya <\/span><em><span style=\"font-weight: 400\">request<\/span><\/em><span style=\"font-weight: 400\"> telah diterima dan sedang diproses.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">2xx \u2192 successful, artinya <\/span><em><span style=\"font-weight: 400\">request<\/span><\/em><span style=\"font-weight: 400\"> telah diterima, dipahami, dan <\/span><em><span style=\"font-weight: 400\">accepted<\/span><\/em><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">3xx \u2192 redirection, artinya butuh tindakan lebih lanjut untuk menyelesaikan <\/span><em><span style=\"font-weight: 400\">request<\/span><\/em><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">4xx \u2192 client error, artinya <\/span><em><span style=\"font-weight: 400\">request<\/span><\/em><span style=\"font-weight: 400\"> mengandung <\/span><em><span style=\"font-weight: 400\">bad syntax<\/span><\/em><span style=\"font-weight: 400\"> atau <\/span><em><span style=\"font-weight: 400\">request<\/span><\/em><span style=\"font-weight: 400\"> tidak dapat dipenuhi.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">5xx \u2192 server error, artinya server gagal memenuhi <\/span><em><span style=\"font-weight: 400\">request<\/span><\/em><span style=\"font-weight: 400\"> dimana <\/span><em><span style=\"font-weight: 400\">request<\/span><\/em><span style=\"font-weight: 400\"> terlihat valid.<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1187\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2021\/09\/1.jpg\" alt=\"\" width=\"366\" height=\"512\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Contoh <\/span><em><span style=\"font-weight: 400\">HTTP response status codes <\/span><\/em><span style=\"font-weight: 400\">yang paling sering ditemui adalah 200 dan 404. <\/span><em><span style=\"font-weight: 400\">HTTP response status codes<\/span><\/em><span style=\"font-weight: 400\"> 200 berarti <\/span><span style=\"font-weight: 400\"><em>response<\/em> <\/span><span style=\"font-weight: 400\">standar untuk <\/span><em><span style=\"font-weight: 400\">HTTP request<\/span><\/em><span style=\"font-weight: 400\"> yang berhasil. Sedangkan <\/span><i><span style=\"font-weight: 400\">HTTP <\/span><\/i><em><span style=\"font-weight: 400\">response status codes<\/span><\/em><span style=\"font-weight: 400\"> 404 berarti sumber daya yang diminta tidak dapat ditemukan tetapi bisa jadi akan tersedia di masa yang akan datang. Untuk melihat seluruh <\/span><em><span style=\"font-weight: 400\">HTTP response status codes<\/span><\/em><span style=\"font-weight: 400\">, kalian bisa mengakses link wikipedia berikut <\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes\"><span style=\"font-weight: 400\">https:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes<\/span><\/a><span style=\"font-weight: 400\">.\u00a0<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Dalam exploit kali ini, akan ada 2 <\/span><em><span style=\"font-weight: 400\">HTTP response status codes <\/span><\/em><span style=\"font-weight: 400\">yang digunakan, yaitu <\/span><em><span style=\"font-weight: 400\">HTTP response status codes <\/span><\/em><span style=\"font-weight: 400\">200 dan 302. <\/span><em><span style=\"font-weight: 400\">HTTP response status codes <\/span><\/em><span style=\"font-weight: 400\">302<\/span> <span style=\"font-weight: 400\">sendiri berarti pengalihan (sumber daya yang diminta telah dipindahkan) ke URL lain. Dengan mengganti <\/span><em><span style=\"font-weight: 400\">HTTP response status codes <\/span><\/em><span style=\"font-weight: 400\">yang awalnya 302 menjadi 200, maka kita dapat mengakses <em>web server<\/em> yang sebelumnya tidak bisa diakses.<\/span><\/p>\n<p style=\"text-align: justify\"><b>Exploit<\/b><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Di sini, saya mencoba mengakses halaman web <\/span><a href=\"http:\/\/previse.htb\/index.php\"><span style=\"font-weight: 400\">http:\/\/previse.htb\/index.php<\/span><\/a><span style=\"font-weight: 400\">. Namun, setiap kali saya menuju halaman tersebut, saya dipindahkan kepada halaman login <\/span><a href=\"http:\/\/previse.htb\/login.php\"><span style=\"font-weight: 400\">http:\/\/previse.htb\/login.php<\/span><\/a><span style=\"font-weight: 400\">. Oleh sebab itu, saya mencoba melakukan <\/span><em><span style=\"font-weight: 400\">intercept<\/span> <span style=\"font-weight: 400\">request<\/span><\/em><span style=\"font-weight: 400\"> halaman index.php menggunakan aplikasi Burpsuite.<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Ketika saya <\/span><em><span style=\"font-weight: 400\">intercept<\/span> <span style=\"font-weight: 400\">reques<\/span><span style=\"font-weight: 400\">t<\/span><\/em><span style=\"font-weight: 400\"> menggunakan aplikasi burpsuite, saya mengirim <\/span><em><span style=\"font-weight: 400\">request<\/span><\/em><span style=\"font-weight: 400\"> yang <\/span><i><span style=\"font-weight: 400\">ter-<\/span><\/i><em><span style=\"font-weight: 400\">intercept<\/span><\/em><span style=\"font-weight: 400\"> tersebut ke dalam <em>repeater <\/em>untuk mempermudah melakukan pengiriman <\/span><em><span style=\"font-weight: 400\">request<\/span><\/em><span style=\"font-weight: 400\"> berulang kali.<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1188\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2021\/09\/2.png\" alt=\"\" width=\"512\" height=\"288\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Sesampainya di repeater, saya mencoba mengirim pesan tersebut. Namun, kita mendapatkan respons \u201c302 Found\u201d (halaman web sedang dipindahkan sementara ke halaman web lain), bukannya \u201c200 OK\u201d (permintaan request berhasil).<\/span><\/p>\n<p style=\"text-align: justify\">\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1190\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2021\/09\/3-1.png\" alt=\"\" width=\"864\" height=\"340\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Namun, apabila kita lebih jeli dalam melihat respons yang diberikan oleh server, kita dapat menemukan sesuatu yang cukup aneh. Hal itu adalah respons yang diberikan oleh server tetap menyertakan isi dari halaman <\/span><a href=\"http:\/\/previse.htb\/index.php\"><span style=\"font-weight: 400\">http:\/\/previse.htb\/index.php<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1191\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2021\/09\/4.png\" alt=\"\" width=\"718\" height=\"532\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Kalau begitu, kita tetap bisa melihat isi dari web tersebut, dong? Jawabannya adalah iya!\u00a0<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Pertama, kita <\/span><em><span style=\"font-weight: 400\">intercept<\/span><\/em><span style=\"font-weight: 400\"> respons dari server menggunakan Burpsuite. Kemudian, kita ubah 302 Found menjadi 200 OK. Sehingga, <\/span><em><span style=\"font-weight: 400\">browser<\/span><\/em><span style=\"font-weight: 400\"> akan menampilkan halaman web dan kita bisa melihat isinya. Kita bisa melakukannya secara manual maupun otomatis. Di sini, saya akan menunjukkan cara melakukannya secara otomatis.<\/span><\/p>\n<p style=\"text-align: justify\"><b>Steps:<\/b><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Pertama, kita menuju Proxy &gt; Options &gt; <\/span><em><span style=\"font-weight: 400\">Intercept<\/span><\/em><span style=\"font-weight: 400\"> Server Responses &gt; Centang box (Intercept responses based on \u2026).<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1192\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2021\/09\/5.png\" alt=\"\" width=\"854\" height=\"417\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Kemudian, pada lokasi yang sama, kita menuju bagian \u201cMatch and Replace\u201d.<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1193\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2021\/09\/6.png\" alt=\"\" width=\"858\" height=\"231\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Pada bagian \u201cMatch and Replace&#8221;, kita pilih Add.\u00a0<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1194\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2021\/09\/7.png\" alt=\"\" width=\"576\" height=\"277\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Pada bagian \u201cAdd&#8221;, kalian isi bagian yang kosong dengan ini:<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Type<\/span> <span style=\"font-weight: 400\">: Response header<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Match<\/span> <span style=\"font-weight: 400\">: 302 Found<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Replace <\/span> <span style=\"font-weight: 400\">: 200 OK<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Comment <\/span> <span style=\"font-weight: 400\">: Redirection Bypass<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Setelah selesai mengisi, kalian pilih OK dan saatnya mencoba!<\/span><\/p>\n<p style=\"text-align: justify\">\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Kita buka halaman <\/span><a href=\"http:\/\/previse.htb\/index.php\"><span style=\"font-weight: 400\">http:\/\/previse.htb\/index.php<\/span><\/a><span style=\"font-weight: 400\"> dan tunggu hingga burpsuite menangkap <\/span><em><span style=\"font-weight: 400\">request<\/span><\/em><span style=\"font-weight: 400\"> yang baru saja kita lakukan. Setelah tertangkap, kita <\/span><em><span style=\"font-weight: 400\">forward<\/span> <span style=\"font-weight: 400\">request<\/span><\/em><span style=\"font-weight: 400\"> web kita.<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1195\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2021\/09\/8.png\" alt=\"\" width=\"815\" height=\"387\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Setelah <\/span><em><span style=\"font-weight: 400\">forward<\/span> <span style=\"font-weight: 400\">request<\/span><\/em><span style=\"font-weight: 400\"> web kita, Burpsuite akan <\/span><em><span style=\"font-weight: 400\">intercept<\/span><\/em><span style=\"font-weight: 400\"> respons dari web server juga. Sehingga, kita <\/span><em><span style=\"font-weight: 400\">forward<\/span><\/em><span style=\"font-weight: 400\"> juga respons tersebut.<\/span><\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1196\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2021\/09\/9.png\" alt=\"\" width=\"809\" height=\"651\" \/><\/p>\n<p style=\"text-align: justify\"><span style=\"font-weight: 400\">Ketika burpsuite menangkap respons dari <\/span><em><span style=\"font-weight: 400\">web server<\/span><\/em><span style=\"font-weight: 400\">, kita dapat lihat bahwa respons telah berubah menjadi 200 OK dan kita diarahkan ke index.php.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1197\" src=\"http:\/\/student-activity.binus.ac.id\/csc\/wp-content\/uploads\/sites\/37\/2021\/09\/10.png\" alt=\"\" width=\"512\" height=\"196\" \/><\/p>\n<p style=\"text-align: justify\">\n","protected":false},"excerpt":{"rendered":"<p>200 OK, 302 Found itu apa? Sebelum kita membahas lebih lanjut, kita perlu mengerti terlebih dahulu apa itu HTTP dan cara kerjanya. HTTP merupakan singkatan dari Hypertext Transfer Protocol, dimana HTTP adalah sebuah protokol pada application layer yang berguna untuk mentransfer informasi seperti dokumen, file, gambar, dan video antar komputer. Contoh dari penggunaan HTTP adalah [&hellip;]<\/p>\n","protected":false},"author":42,"featured_media":1198,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1186","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles"],"_links":{"self":[{"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/posts\/1186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/comments?post=1186"}],"version-history":[{"count":1,"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/posts\/1186\/revisions"}],"predecessor-version":[{"id":1199,"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/posts\/1186\/revisions\/1199"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/media\/1198"}],"wp:attachment":[{"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/media?parent=1186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/categories?post=1186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/student-activity.binus.ac.id\/csc\/wp-json\/wp\/v2\/tags?post=1186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}