• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

How to exploit Website’s Local File Inclusion vulnerability?

AnonyViet by AnonyViet
January 25, 2023
in Security
0

This article will explain what a local file is and how we can use it to exploit the computer. You can use this knowledge to solve Christmas Advent of Cyber ​​challenge number 14!

Join the channel Telegram of the AnonyViet 👉 Link 👈

How to exploit local files in web path

How to exploit the Local File Inclusion vulnerability

Some web applications will take the contents of the file and upload it to the website. Or the application can include it in the document and parse it as part of the programming language.

For example, if a web application has the following path:

https://example.com/?include_file=file1.php

This link will get content from file1.php and display it on the web. If an application does not whitelist what files can be uploaded and accessed via the path, the user can request the /etc/shadow file, which shows all encrypted users on the system running web application.

When the web application contains a file, it reads the file with the permissions of the user running the web server. For example, if user joe runs the webserver, it will read the file with the permissions of joe, if run as root, it will have the permissions of the root user. It’s a good idea to anticipate this when creating files, first try to create a file that you know the web server has read permission (such as robots.txt if the web server has it), to see if it’s vulnerable. exploit this way or not.

With the Local File Inclusion vulnerability, you can try and view the following files to assist you in server management.

  • /etc/shadow – View encrypted passwords of all users on the system
  • server.js or index.js – If the application is written in NodeJS, these are common filenames containing the main code of the application – API credentials may be exposed.
  • /etc/hosts – Contains information about what other devices the web server is communicating with on the network.
  • /uploads/evil.php – If you upload your own web shell to a web server, you can execute it using this vulnerability.

Tips for completing the challenge

Some web servers will treat every slash (/) as a path to the new page, but what if we want to dig into a file like /etc/shadow?

https://example.com/notes/?include=/etc/shadow

The server will think it will access /notes/include/etc/shadow. So you can’t add a slash in the URL because the web server will think it’s accessing a different directory.

The solution is to use URL encoding. URL encoding replaces unsafe ASCII characters with ‘%’ followed by two hexadecimal digits. The slash (/) can be URL encoded as %2F. Hence we can change the path to:

https://example.com/notes/?include=%2Fetc%2Fshadow

This new request will access /notes/ and then convert %2F to a slash. So that’s it then.

https://meyerweb.com/eric/tools/dencoder/ – This is a useful URL encoder and decoder you can use.

Also, you can see how to solve shodan.io on TryHackMe here.

The article achieved: 5/5 – (100 votes)

Tags: exploitfileInclusionLocalvulnerabilityWebsites
Previous Post

Download Hack of Products v5 APK – Hack items on Android

Next Post

Lesson 263: Quadratic equations

AnonyViet

AnonyViet

Related Posts

How to implement Shellcode Injection attack technique with Autoit
Security

How to implement Shellcode Injection attack technique with Autoit

March 14, 2025
How to exploit the holy hole of Hijacking on Windows
Security

How to exploit the holy hole of Hijacking on Windows

March 8, 2025
Hamamal: Shellcode execution technique from afar to overcome Antivirus's discovery
Security

Hamamal: Shellcode execution technique from afar to overcome Antivirus's discovery

February 10, 2025
Snov.io Email Finder: Search emails with only company name/domain name/LinkedIn profile
Security

Snov.io Email Finder: Search emails with only company name/domain name/LinkedIn profile

December 14, 2024
Capsolver: Automatic solution solution for business
Security

Capsolver: Automatic solution solution for business

December 12, 2024
Seekr: Collect & manage OSINT data
Security

Seekr: Collect & manage OSINT data

November 22, 2024
Next Post
Lesson 263: Quadratic equations

Lesson 263: Quadratic equations

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

Top 5 game programming languages ​​to learn now

Top 5 game programming languages ​​to learn now

June 8, 2025
The iPhone list is updated with iOS 26

The iPhone list is updated with iOS 26

June 8, 2025
Discover the glowing effect next to the iPhone ios 18 screen

Discover the glowing effect next to the iPhone ios 18 screen

June 8, 2025
[Godot Shooter] #2: Creating characters & shooting bullets

[Godot Shooter] #2: Creating characters & shooting bullets

June 7, 2025
Top 5 game programming languages ​​to learn now

Top 5 game programming languages ​​to learn now

June 8, 2025
The iPhone list is updated with iOS 26

The iPhone list is updated with iOS 26

June 8, 2025
Discover the glowing effect next to the iPhone ios 18 screen

Discover the glowing effect next to the iPhone ios 18 screen

June 8, 2025
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Top 5 game programming languages ​​to learn now

Top 5 game programming languages ​​to learn now

June 8, 2025
The iPhone list is updated with iOS 26

The iPhone list is updated with iOS 26

June 8, 2025
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí SHBET https://kubet88.yoga/ bj88

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí SHBET https://kubet88.yoga/ bj88

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply