Skip to content

Instantly share code, notes, and snippets.

@to016
Last active October 11, 2023 05:57
Show Gist options
  • Save to016/f46a6b7da5d91ec7e60edde9ce5edef9 to your computer and use it in GitHub Desktop.
Save to016/f46a6b7da5d91ec7e60edde9ce5edef9 to your computer and use it in GitHub Desktop.
Some notes about ginowa challenge in BalsnCTF 2023

[web] Ginowa

Intended: sqli write webshell kết hợp với mysql trick (dùng @ trong đường dẫn để chỉ định port -> WebDAV via HTTP) access tới webshell thông qua unc path (load_file('\\\\localhost:8080/shell.php'))

Một vài note

When a UNC path is navigated to, the protocol used depends on your provider order. The default Windows configuration will attempt SMB, and then if unavailable, will then attempt WebDAV. Here is the result of running: net use \\173.xxx.xxx.xxx\sdfsdfsdf

image

Computer first tries to connect over port 445. It then tries to connect over port 139. After being unable to, it eventually attempts WebDAV over port 80. But when a port is specified with the @ symbol, it will always attempt WebDAV via HTTP, regardless of port. It will not attempt to connect via the SMB protocol.

Quay trở lại challenge

image

image

image

bên cạnh \\\\ // cũng sẽ hoạt động

Unintended: readfile thông qua window shortened path name

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment