CBJS: Path Traversal 3

Peppa - Aug 19 - - Dev Community

Mục Tiêu

  • Chiếm quyền điều khiển server và đọc một tập tin bí mật ở thư mục gốc (đường dẫn /)

Attack

  • Website cho phép upload và đặt tên album

Image description

  • Nhấn download để read file

Image description

  • File sẽ được lưu trong thư mục document_root/upload/2_hex/album_name/file_name

Image description

  • Tên album không có bất kì filtering nào có thể dẫn đến path traversal

Image description

Khi upload file, php sẽ tự động bỏ đi ../ trong file name để tránh path traversal

Từ dữ liệu trên chỉ cần thay đổi album name thành ../../ giúp lùi về document_root sau đó upload file php -> có thể RCE

Image description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player