我需要一个工具来测试最近公开的 SpringBreak 漏洞(CVE-2017-8046)的多个不同端点,但找不到现成的,所以我临时拼凑了这个。
_______ _______ _______ _________ _ _______ ______ _______ _______ _______ _
( ____ \( ____ )( ____ )\__ __/( ( /|( ____ \( ___ \ ( ____ )( ____ \( ___ )| \ /\
| ( \/| ( )|| ( )| ) ( | \ ( || ( \/| ( ) )| ( )|| ( \/| ( ) || \ / /
| (_____ | (____)|| (____)| | | | \ | || | | (__/ / | (____)|| (__ | (___) || (_/ /
(_____ )| _____)| __) | | | (\ \) || | ____ | __ ( | __)| __) | ___ || _ (
) || ( | (\ ( | | | | \ || | \_ )| ( \ \ | (\ ( | ( | ( ) || ( \ \
/\____) || ) | ) \ \_____) (___| ) \ || (___) || )___) )| ) \ \__| (____/\| ) ( || / \
\_______)|/ |/ \__/\_______/|/ )_)(_______)|/ \___/ |/ \__/(_______/|/ \||_/ \/
PoC for CVE-2017-8046. Available commands:
target <https://host/app/path>
exec <command to execute on target>
base64 <on|off> (Toggles base64 encoding of commands (uses bash), default: on)
verify <on|off> (Toggles SSL verification, default: on)
exit
Note: This is blind RCE, commands executed will not return output.
SpringBreak>
这些应该不言自明,但为了进一步说明 base64:
base64 默认开启,会将命令转换为 base64 并包装成 bash -c {echo,BASE64_COMMAND}|{base64,-d}|{bash,-i}。关闭后将以原始格式发送命令(在转换为字节数组后)。