<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mahdiar Naufal on Medium]]></title>
        <description><![CDATA[Stories by Mahdiar Naufal on Medium]]></description>
        <link>https://medium.com/@mahdiarnaufal_59412?source=rss-20e09bad82d6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*TyeUo0zzDRf0QGY1</url>
            <title>Stories by Mahdiar Naufal on Medium</title>
            <link>https://medium.com/@mahdiarnaufal_59412?source=rss-20e09bad82d6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 13:47:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mahdiarnaufal_59412/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[SQL Injection and  Reflected Cross Site Scripting on Iksena’s NIM Finder]]></title>
            <link>https://medium.com/@mahdiarnaufal_59412/sql-injection-and-reflected-cross-site-scripting-on-iksenas-nim-finder-8effe0ef8d79?source=rss-20e09bad82d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/8effe0ef8d79</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[sql-injection]]></category>
            <category><![CDATA[xs]]></category>
            <category><![CDATA[vulnerability]]></category>
            <dc:creator><![CDATA[Mahdiar Naufal]]></dc:creator>
            <pubDate>Sun, 31 Mar 2019 20:03:02 GMT</pubDate>
            <atom:updated>2019-03-31T20:03:02.611Z</atom:updated>
            <content:encoded><![CDATA[<h3>SQL Injection and Reflected Cross Site Scripting on Iksena’s NIM Finder</h3><p>Iksena NIM Finder is a tools that help students from ITB to finding information about students, the information consists of name, student id, major, and admission year. You can check out the website here: <a href="http://iksena.xyz/nim">iksena.xyz/nim</a></p><p>How to use it? Just type a student’s attribute on the search box, it can be name, student id, major, or admission year.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EV4yzbkXQZGNNYW_4Hd1oQ.jpeg" /><figcaption>NIM Finder when i put my name on the search box.</figcaption></figure><p>First, i try to input the sql comment on the search bar and nothing happened, but when i try to input with code below, it shows many data of the user. It’s different from when i input the empty query.</p><pre>&#39; OR &#39;1&#39;=&#39;1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pMXHq8nxPvULsAQ4jVwiAg.jpeg" /><figcaption>NIM Finder when i put code above</figcaption></figure><p>So i try another code by adding LIMIT 5; to see if my injection work, turns out that the finder only shows 5 rows of data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3TJ0CcUCvATkdqcjqdQgOA.jpeg" /><figcaption>NIM Finder with limit query</figcaption></figure><p>This means that i <strong>can</strong> inject the database using SQL Injection. The next step is how i print my result of database information. I’m using UNION to do that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fzfkxYw0XjV-has85EqCOg.jpeg" /><figcaption>The table after using union with multiple select</figcaption></figure><p>After i do that, i managed to use version(), database(), and TABLE_NAME from INFORMATION_SCHEMA.TABLES.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-bhQWZzGlHNPbTOJrMnbTQ.jpeg" /><figcaption>I conceal the database name that shown in “NIM TPB” column</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DPMLKDqn6TQvjW5GOKkZqQ.jpeg" /></figure><p>After obtained the tables i am interested in one table, the name is “nim_finder_iksena”. This is a table where the owner put students information.</p><p>I find out the columns of that table by putting this query into search box:</p><pre>asdf&#39; UNION SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = &#39;nim_finder_iksena&#39;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Em_PzA360xutHsmBvOMNeQ.jpeg" /></figure><p>After knowing the column names, i can manipulate the “nim_finder_iksena” table. I only update my data using this query, this query including some javascript code so i can check wether the site is vulnerable to cross-site scripting or not:</p><pre>asdf&#39; ; UPDATE nim_finder_iksena SET prodi=&#39;&lt;script&gt;document.body.style.background = `#ce390e`;&lt;/script&gt;&#39; WHERE nim_prodi = 13515022;</pre><p>Nothing happened, but when i search my info using my student id, it appears like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EzjOnp9Y6RfzMbcfGcC1bg.jpeg" /></figure><p>You can see at “Jurusan” column is empty because i put some javascript code in it, the code is modify the background color of HTML body.</p><h3><strong>Is It Bad?</strong></h3><p>Both vulnerability was listed in OWASP Top 10 2017 (You can see it here: <a href="https://www.owasp.org/index.php/Top_10-2017_Top_10">https://www.owasp.org/index.php/Top_10-2017_Top_10</a>). The Injection is listed in A1 and the Cross-site scripting is listed in A7.</p><p>For SQL Injection, it can injected using malicious query such as DROP DATABASE or DROP TABLE.</p><p>For Cross-Site Scripting, it can manipulate the entire page by using javascript, attacker can stole session key or put some malicious code such as clickjacking for Cross-Site Request Forgery (CSRF).</p><h3><strong>How to prevent this problem</strong></h3><p>There are many option to prevent SQL Injection. One of them is you can use bind parameter on SQL execution. For cross-site scripting you can use strip_tags() function if you are using PHP programming language.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8effe0ef8d79" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rumah Bisa Tidak Aman Karena Nomor Telponnya!]]></title>
            <link>https://medium.com/@mahdiarnaufal_59412/rumah-bisa-tidak-aman-karena-nomor-telponnya-4832691d873c?source=rss-20e09bad82d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/4832691d873c</guid>
            <category><![CDATA[social-engineering]]></category>
            <category><![CDATA[telephone]]></category>
            <category><![CDATA[privacy-protection]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Mahdiar Naufal]]></dc:creator>
            <pubDate>Thu, 05 Jul 2018 11:58:27 GMT</pubDate>
            <atom:updated>2018-07-05T11:58:27.019Z</atom:updated>
            <content:encoded><![CDATA[<p>Suara telepon rumahku berdering ketika aku sedang belajar di kamar adikku, aku segera berjalan menuju ruang tengah untuk mengambil teleponnya. Kuangkat teleponnya, tidak terdengar suara apa — apa. Sambil melihat ke luar rumah, terdapat seorang laki — laki yang berdiri di depan rumah tetangga yang bersebrangan dengan rumahku, orang tersebut berdiri menghadap rumahku sambil menempelkan <em>smartphone</em> nya di telinganya. Ketika telepon ku mati, orang yang tadi menurunkan <em>smartphone </em>nya dan langsung memainkannya.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yzOZwQ1sxyecekPx7bGMcg.jpeg" /><figcaption>Kurang lebih seperti ini gambaran orang yang diceritakan</figcaption></figure><p>Aku curiga, apakah yang menelepon tadi adalah orang tersebut. Memang terdengar seperti orang yang paranoid, apalagi saat itu aku sendirian di rumah. Tapi bukan berarti tidak mungkin kan? Aku berpikir, dari mana orang tersebut mendapatkan nomor telepon rumahku <strong>jika memang benar</strong>. Aku teringat beberapa bulan yang lalu seorang penagih kredit menelepon rumahku. Bukan, bukan aku atau keluargaku yang terlibat utang melainkan tetangga (selanjutnya akan aku namakan tetangga A) yang rumahnya berada persis di sebelah kanan rumahku. Tetapi tetangga ku (selanjutnya akan aku namakan tetangga B) yang rumahnya berada di dua rumah sebelah kanan rumahku tidak ditagih! Aku bertanya kepada tetangga A apakah dia memberikan data mengenai kontak rumahku, tetapi dia menjawab tidak dan aku mempercayainya.</p><p>Lalu bagaimana caranya si penagih utang tadi menemukan nomor telepon rumahku? Jawabannya adalah dengan menggunakan alamat rumah.</p><p>Jika kalian yang menggunakan layanan T*lkom untuk telepon rumah, nomor telepon rumah anda dapat diketahui dengan cara menghubungi 108. Cukup dengan memberikan alamat rumah kepada <em>customer service</em> yang menjawab telepon anda, maka anda akan diberikan nomor teleponnya.</p><p>Tetangga B sudah meminta kepada 108 untuk tidak mempublikasikan nomor teleponnya, jadi ketika saya berusaha menanyakan nomor telepon tetangga B ke 108 ditolak.</p><p>Dari kejadian pagi ini, aku langsung menelepon 108 untuk minta tidak mempublikasikan nomor telepon rumahku, mereka memberikan layanan yang cepat karena ketika pukul 9 pagi saya cek telpon lagi ke 108 ternyata sudah tidak dapat ditanyakan lagi.</p><h3>Paling cuman iseng aja, engga akan membahayakan kok</h3><p>Untuk alasan keamanan, sebaiknya kita selalu memikirkan semua kemungkinan yang ada. Bisa jadi karena rumahku terlihat kosong, orang tadi mencoba menelepon rumahku untuk mengecek benar — benar kosong apa tidak. Ditambah lagi belakangan ini sering terdapat kejadian telepon dari orang yang berusaha menipu, caranya berbagai macam seperti memberitahu anak dari anggota keluarga yang ditelepon kecelakaan atau dia mengaku sebagai salah satu anggota keluarga di rumah tersebut yang sedang mengalami musibah sehingga membutuhkan uang.</p><p>Dengan tindakanku tadi meminta 108 untuk tidak mempublikasikan nomor teleponku adalah salah satu langkah untuk memperkuat keamanan di rumah, dan juga untuk menjaga kerahasiaan data pribadi. Aku menyarankan kalian jika menggunakan layanan telepon yang sama untuk melakukan langkah yang sama.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4832691d873c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>