<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Directory_Traversal%2C_File_Inclusion</id>
	<title>Directory Traversal, File Inclusion - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Directory_Traversal%2C_File_Inclusion"/>
	<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Directory_Traversal,_File_Inclusion&amp;action=history"/>
	<updated>2026-04-04T11:07:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.4</generator>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Directory_Traversal,_File_Inclusion&amp;diff=70590&amp;oldid=prev</id>
		<title>Onnowpurbo: /* Mencegah Directory Traversal dan File Inclusion */</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Directory_Traversal,_File_Inclusion&amp;diff=70590&amp;oldid=prev"/>
		<updated>2024-09-15T03:19:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Mencegah Directory Traversal dan File Inclusion&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:19, 15 September 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l50&quot; &gt;Line 50:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 50:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Mencegah Directory Traversal dan File Inclusion==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Mencegah Directory Traversal dan File Inclusion==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;**&lt;/del&gt;Validasi Input:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;** &lt;/del&gt;Selalu validasi semua input pengguna untuk memastikan bahwa input tersebut sesuai dengan yang diharapkan.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;Validasi Input:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;Selalu validasi semua input pengguna untuk memastikan bahwa input tersebut sesuai dengan yang diharapkan.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;**&lt;/del&gt;Whitelist:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;** &lt;/del&gt;Buat whitelist untuk file dan direktori yang diperbolehkan untuk diakses.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;Whitelist:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;Buat whitelist untuk file dan direktori yang diperbolehkan untuk diakses.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;**&lt;/del&gt;Relativize Path:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;** &lt;/del&gt;Gunakan fungsi-fungsi yang disediakan oleh bahasa pemrograman untuk membuat path yang relatif terhadap direktori aplikasi.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;Relativize Path:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;Gunakan fungsi-fungsi yang disediakan oleh bahasa pemrograman untuk membuat path yang relatif terhadap direktori aplikasi.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;**&lt;/del&gt;Disable Functions:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;** &lt;/del&gt;Nonaktifkan fungsi-fungsi yang berisiko seperti &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;`&lt;/del&gt;include&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;`&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;`&lt;/del&gt;require&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;`&lt;/del&gt;, dan &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;`&lt;/del&gt;eval&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;` &lt;/del&gt;jika tidak diperlukan.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;Disable Functions:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;Nonaktifkan fungsi-fungsi yang berisiko seperti &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;include&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;require&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;, dan &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;eval&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;jika tidak diperlukan.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;**&lt;/del&gt;Chroot Jail:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;** &lt;/del&gt;Batasi akses aplikasi ke sistem file dengan menggunakan chroot jail.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;Chroot Jail:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;Batasi akses aplikasi ke sistem file dengan menggunakan chroot jail.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Kesimpulan==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Kesimpulan==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Directory_Traversal,_File_Inclusion&amp;diff=70589&amp;oldid=prev</id>
		<title>Onnowpurbo: /* Kombinasi Directory Traversal dan File Inclusion */</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Directory_Traversal,_File_Inclusion&amp;diff=70589&amp;oldid=prev"/>
		<updated>2024-09-15T03:18:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Kombinasi Directory Traversal dan File Inclusion&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:18, 15 September 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot; &gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Serangan directory traversal seringkali digunakan sebagai langkah awal untuk melakukan serangan file inclusion. Setelah penyerang berhasil menemukan lokasi file yang berisi kode, mereka dapat memasukkan file tersebut untuk mengeksekusi kode mereka sendiri.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Serangan directory traversal seringkali digunakan sebagai langkah awal untuk melakukan serangan file inclusion. Setelah penyerang berhasil menemukan lokasi file yang berisi kode, mereka dapat memasukkan file tersebut untuk mengeksekusi kode mereka sendiri.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;**&lt;/del&gt;Contoh Skenario Serangan:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;**&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;Contoh Skenario Serangan:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;1. *&lt;/del&gt;*Menemukan Lokasi File:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;** &lt;/del&gt;Penyerang menggunakan directory traversal untuk menemukan lokasi file konfigurasi PHP (php.ini) atau file log yang berisi informasi sensitif.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;Menemukan Lokasi File:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;Penyerang menggunakan directory traversal untuk menemukan lokasi file konfigurasi PHP (php.ini) atau file log yang berisi informasi sensitif.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2. *&lt;/del&gt;*Membaca File:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;** &lt;/del&gt;Penyerang membaca isi file konfigurasi PHP untuk mencari tahu direktori tempat file PHP yang dapat dieksekusi disimpan.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;Membaca File:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;Penyerang membaca isi file konfigurasi PHP untuk mencari tahu direktori tempat file PHP yang dapat dieksekusi disimpan.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;3. *&lt;/del&gt;*Mengeksekusi Kode:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;** &lt;/del&gt;Penyerang menggunakan file inclusion untuk memasukkan file PHP yang berisi kode jahat yang mereka buat.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;Mengeksekusi Kode:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;Penyerang menggunakan file inclusion untuk memasukkan file PHP yang berisi kode jahat yang mereka buat.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Mencegah Directory Traversal dan File Inclusion==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Mencegah Directory Traversal dan File Inclusion==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Directory_Traversal,_File_Inclusion&amp;diff=70588&amp;oldid=prev</id>
		<title>Onnowpurbo: /* Apa itu File Inclusion? */</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Directory_Traversal,_File_Inclusion&amp;diff=70588&amp;oldid=prev"/>
		<updated>2024-09-15T03:17:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Apa itu File Inclusion?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:17, 15 September 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l28&quot; &gt;Line 28:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 28:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Contoh Sederhana:'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Contoh Sederhana:'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Misalkan sebuah aplikasi web memiliki fitur untuk menampilkan konten halaman berdasarkan nama file. URL-nya mungkin seperti ini:  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Misalkan sebuah aplikasi web memiliki fitur untuk menampilkan konten halaman berdasarkan nama file. URL-nya mungkin seperti ini:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  http://contoh.com/halaman?file=home&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  http://contoh.com/halaman?file=home&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Jika aplikasi tidak memvalidasi input ''file'' dengan benar, penyerang bisa mengganti nilai ''file'' menjadi &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;`&lt;/del&gt;../../../../etc/passwd&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;`. &lt;/del&gt;Jika aplikasi menggunakan fungsi &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;`&lt;/del&gt;include&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;` &lt;/del&gt;atau &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;`&lt;/del&gt;require&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;` &lt;/del&gt;untuk memasukkan file, maka file `passwd` akan dibaca dan ditampilkan di halaman web.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Jika aplikasi tidak memvalidasi input ''file'' dengan benar, penyerang bisa mengganti nilai ''file'' menjadi&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;../../../../etc/passwd&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Jika aplikasi menggunakan fungsi &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;include&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;atau &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;require&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;untuk memasukkan file, maka file `passwd` akan dibaca dan ditampilkan di halaman web.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Kombinasi Directory Traversal dan File Inclusion==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Kombinasi Directory Traversal dan File Inclusion==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Directory_Traversal,_File_Inclusion&amp;diff=70587&amp;oldid=prev</id>
		<title>Onnowpurbo: /* Contoh Sederhana: */</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Directory_Traversal,_File_Inclusion&amp;diff=70587&amp;oldid=prev"/>
		<updated>2024-09-15T03:16:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Contoh Sederhana:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:16, 15 September 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l11&quot; &gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  http://contoh.com/profil?user=123&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  http://contoh.com/profil?user=123&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Jika aplikasi tidak memvalidasi input ''user'' dengan benar, penyerang bisa mengganti nilai ''user'' menjadi &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;`&lt;/del&gt;../../../../etc/passwd&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;`. &lt;/del&gt;Dengan cara ini, penyerang bisa membaca file ''passwd'' yang berisi informasi sensitif tentang pengguna sistem operasi.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Jika aplikasi tidak memvalidasi input ''user'' dengan benar, penyerang bisa mengganti nilai ''user'' menjadi&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;../../../../etc/passwd&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Dengan cara ini, penyerang bisa membaca file ''passwd'' yang berisi informasi sensitif tentang pengguna sistem operasi.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Apa itu File Inclusion?==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Apa itu File Inclusion?==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Directory_Traversal,_File_Inclusion&amp;diff=70586&amp;oldid=prev</id>
		<title>Onnowpurbo: Created page with &quot;==Directory Traversal dan File Inclusion: Menjelajahi Sistem File secara Tak Terduga==  ==Apa itu Directory Traversal?==  Directory traversal adalah sebuah kerentanan pada apl...&quot;</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Directory_Traversal,_File_Inclusion&amp;diff=70586&amp;oldid=prev"/>
		<updated>2024-09-15T03:11:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Directory Traversal dan File Inclusion: Menjelajahi Sistem File secara Tak Terduga==  ==Apa itu Directory Traversal?==  Directory traversal adalah sebuah kerentanan pada apl...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Directory Traversal dan File Inclusion: Menjelajahi Sistem File secara Tak Terduga==&lt;br /&gt;
&lt;br /&gt;
==Apa itu Directory Traversal?==&lt;br /&gt;
&lt;br /&gt;
Directory traversal adalah sebuah kerentanan pada aplikasi web di mana penyerang dapat memanipulasi input pengguna untuk mengakses file atau direktori di luar direktori yang seharusnya dapat diakses. Bayangkan seperti Anda sedang berjalan-jalan di sebuah mall, namun Anda bisa keluar dari jalur yang ditentukan dan masuk ke area-area terbatas seperti gudang atau ruang kontrol.&lt;br /&gt;
&lt;br /&gt;
==Contoh Sederhana:==&lt;br /&gt;
&lt;br /&gt;
Misalkan sebuah aplikasi web memiliki fitur untuk menampilkan profil pengguna berdasarkan ID. URL-nya mungkin seperti ini:&lt;br /&gt;
&lt;br /&gt;
 http://contoh.com/profil?user=123&lt;br /&gt;
&lt;br /&gt;
Jika aplikasi tidak memvalidasi input ''user'' dengan benar, penyerang bisa mengganti nilai ''user'' menjadi `../../../../etc/passwd`. Dengan cara ini, penyerang bisa membaca file ''passwd'' yang berisi informasi sensitif tentang pengguna sistem operasi.&lt;br /&gt;
&lt;br /&gt;
==Apa itu File Inclusion?==&lt;br /&gt;
&lt;br /&gt;
'''File inclusion''' adalah kerentanan di mana penyerang dapat memaksa server untuk mengeksekusi file yang tidak seharusnya dijalankan. Ini seringkali terjadi ketika aplikasi web memungkinkan pengguna untuk menentukan file mana yang akan di-include atau di-require.&lt;br /&gt;
&lt;br /&gt;
'''Jenis File Inclusion:'''&lt;br /&gt;
&lt;br /&gt;
* '''Local File Inclusion (LFI):''' Penyerang memaksa server untuk membaca dan mengeksekusi file yang berada di server yang sama.&lt;br /&gt;
* '''Remote File Inclusion (RFI):''' Penyerang memaksa server untuk membaca dan mengeksekusi file dari server lain.&lt;br /&gt;
&lt;br /&gt;
'''Contoh Sederhana:'''&lt;br /&gt;
&lt;br /&gt;
Misalkan sebuah aplikasi web memiliki fitur untuk menampilkan konten halaman berdasarkan nama file. URL-nya mungkin seperti ini: &lt;br /&gt;
 http://contoh.com/halaman?file=home&lt;br /&gt;
&lt;br /&gt;
Jika aplikasi tidak memvalidasi input ''file'' dengan benar, penyerang bisa mengganti nilai ''file'' menjadi `../../../../etc/passwd`. Jika aplikasi menggunakan fungsi `include` atau `require` untuk memasukkan file, maka file `passwd` akan dibaca dan ditampilkan di halaman web.&lt;br /&gt;
&lt;br /&gt;
==Kombinasi Directory Traversal dan File Inclusion==&lt;br /&gt;
&lt;br /&gt;
Serangan directory traversal seringkali digunakan sebagai langkah awal untuk melakukan serangan file inclusion. Setelah penyerang berhasil menemukan lokasi file yang berisi kode, mereka dapat memasukkan file tersebut untuk mengeksekusi kode mereka sendiri.&lt;br /&gt;
&lt;br /&gt;
**Contoh Skenario Serangan:**&lt;br /&gt;
&lt;br /&gt;
1. **Menemukan Lokasi File:** Penyerang menggunakan directory traversal untuk menemukan lokasi file konfigurasi PHP (php.ini) atau file log yang berisi informasi sensitif.&lt;br /&gt;
2. **Membaca File:** Penyerang membaca isi file konfigurasi PHP untuk mencari tahu direktori tempat file PHP yang dapat dieksekusi disimpan.&lt;br /&gt;
3. **Mengeksekusi Kode:** Penyerang menggunakan file inclusion untuk memasukkan file PHP yang berisi kode jahat yang mereka buat.&lt;br /&gt;
&lt;br /&gt;
==Mencegah Directory Traversal dan File Inclusion==&lt;br /&gt;
&lt;br /&gt;
* **Validasi Input:** Selalu validasi semua input pengguna untuk memastikan bahwa input tersebut sesuai dengan yang diharapkan.&lt;br /&gt;
* **Whitelist:** Buat whitelist untuk file dan direktori yang diperbolehkan untuk diakses.&lt;br /&gt;
* **Relativize Path:** Gunakan fungsi-fungsi yang disediakan oleh bahasa pemrograman untuk membuat path yang relatif terhadap direktori aplikasi.&lt;br /&gt;
* **Disable Functions:** Nonaktifkan fungsi-fungsi yang berisiko seperti `include`, `require`, dan `eval` jika tidak diperlukan.&lt;br /&gt;
* **Chroot Jail:** Batasi akses aplikasi ke sistem file dengan menggunakan chroot jail.&lt;br /&gt;
&lt;br /&gt;
==Kesimpulan==&lt;br /&gt;
&lt;br /&gt;
Directory traversal dan file inclusion adalah dua kerentanan yang sangat umum dan berbahaya. Dengan memahami bagaimana serangan ini bekerja, Anda dapat mengambil langkah-langkah yang diperlukan untuk mencegah serangan ini terjadi pada aplikasi web Anda.&lt;br /&gt;
&lt;br /&gt;
==Pranala Menarik==&lt;br /&gt;
&lt;br /&gt;
* [[Ethical Hacking]]&lt;br /&gt;
* [[Contoh exploit yang lebih kompleks]]&lt;br /&gt;
* [[Tool yang digunakan untuk mendeteksi kerentanan ini]]&lt;br /&gt;
* [[Cara menguji aplikasi web Anda untuk menemukan kerentanan ini]]&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>