Я работаю над Kioptrix 3 и обнаружил, что в веб-приложении использовалась LotusCMS.
kali@kali:~$ curl 10.10.10.10 2>/dev/null | grep -i cms
<meta name="keywords" content="LotusCMS" />
<p>We've revamped our website for the new release of the new gallery CMS we made. We are geared towards security...</p>
kali@kali:~$
Нашел эксплойт через searchsploit и решил попробовать.
kali@kali:~$ searchsploit LotusCMS
------------------------------------------------------------------------------------- ---------------------------------
Exploit Title | Path
------------------------------------------------------------------------------------- ---------------------------------
LotusCMS 3.0 - 'eval()' Remote Command Execution (Metasploit) | php/remote/18565.rb
LotusCMS 3.0.3 - Multiple Vulnerabilities | php/webapps/16982.txt
------------------------------------------------------------------------------------- ---------------------------------
Shellcodes: No Results
kali@kali:~$
kali@kali:~$ wc -l /usr/share/exploitdb/exploits/php/remote/18565.rb
146 /usr/share/exploitdb/exploits/php/remote/18565.rb
kali@kali:~$
Я проверил содержимое кода и обнаружил, что он является частью Metasploit Framework.
kali@kali:~$ cat -n /usr/share/exploitdb/exploits/php/remote/18565.rb | more
1 ##
2 # This file is part of the Metasploit Framework and may be subject to
3 # redistribution and commercial restrictions. Please see the Metasploit
4 # Framework web site for more information on licensing and terms of use.
5 # http://metasploit.com/framework/
6 ##
7
8 require 'msf/core'
9
10 class Metasploit3 < Msf::Exploit::Remote
11 Rank = ExcellentRanking
Когда я пытаюсь выполнить код,
kali@kali:~$ ruby /usr/share/exploitdb/exploits/php/remote/18565.rb
Traceback (most recent call last):
`2: from /usr/share/exploitdb/exploits/php/remote/18565.rb:8:in \`<main>'`
`1: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in \`require'`
/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in \require': cannot load such file -- msf/core (LoadError)`
kali@kali:~$
Можно ли использовать этот код без Metasploit, поскольку он не разрешен на экзамене OSCP?