一些代码审计

https://www.leavesongs.com/PENETRATION/cachet-from-laravel-sqli-to-bug-bounty.html有感,去找一下有类似bug的问题

简单来说 就是存在where\(\$\w+\)的代码

但是再回溯一下 scopeSearch 方法并没有直接调用 再看了眼文章,scope是laravel限定的一种写法,scopeSearch可以用search调用,这样就能理解了

  • https://github.com/Hifone/Hifone 跟cachet完全一样的写法 不过国人开发的 没多少star 也停止维护了
  • C:\Users\MECHREVO\work\osu-web\app\Http\Controllers\FollowsController.php应该是有注入?
  • C:\Users\MECHREVO\work\twill\src\Http\Controllers\Admin\SettingController.php可能也有注入

dujiaoka

经过检查 不存在laravel的debug rce

1
2
3
4
5
fopen() unlink() stat() fstat() fseek() rename() opendir() rmdir() mkdir() file_put_contents() file_get_contents() 
file_exists() fileinode() include() require() include_once require_once() filemtime() fileowner() fileperms()
filesize() is_dir() scandir() rmdir() highlight_file()
//外加一个类
new DirectoryIteartor()

如果有后台权限或者sqli的话 那么就可以通过这里进行一个phar的rce

image-20230109063552384

Author: hundan
Link: https://hundan.org/2023/01/07/一些代码审计/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.