procmon启动时服务器没有响应

时间:2020-03-19 21:41:41

标签: fuzzing process-monitoring boofuzz

我在Ubuntu机器上使用boofuzz 0.1.6。我正在尝试使process_monitor_unix连接到我想要模糊的服务器程序。当我启动procmon和脚本时,在procmon上获得以下输出:

[05:47.20] Process Monitor PED-RPC server initialized:
[05:47.20]   listening on:  0.0.0.0:26002
[05:47.20]   crash file:    /home/rico/PycharmProjects/iec104_server_fuzz/boofuzz-crash-bin
[05:47.20]   # records:     0
[05:47.20]   proc name:     None
[05:47.20]   log level:     1
[05:47.20] awaiting requests...
[05:47.24] updating target process name to './simple_server'
[05:47.24] updating stop commands to: [u'kill -SIGINT $(pidof simple_server)']
[05:47.24] updating start commands to: [u'/home/rico/iec60870/lib60870-master/lib60870-C/examples/cs104_server/simple_server']
[05:47.24] updating crash bin filename to 'boofuzz-crash-bin-2020-03-19T16-47-24'
[05:47.24] Starting target...
[05:47.24] starting target process
[05:47.24] done. waiting for start command to terminate.
APCI parameters:
 t0: 10
 t1: 15
 t2: 10
 t3: 20
 k: 12
 w: 8

输出“ APCI parameters ...”是服务器的消息,每次启动服务器时都会发送该消息。因此,我认为它已启动并正在运行。我的问题是它没有响应传入的tcp-packages。 我的模糊脚本的输出如下:

[2020-03-19 17:47:24,314]     Info: Web interface can be found at http://localhost:26000
[2020-03-19 17:47:24,316] Test Case: 1: activate->s_formatAPDU.no-name.1 
[2020-03-19 17:47:24,316]     Info: Type: Bytes. Default value: b'\x91\xef\xa5'. Case 1 of 270 overall.
[2020-03-19 17:47:24,316]   Test Step: Calling procmon pre_send()

在此测试步骤中卡住了。 当我先启动服务器,然后启动procmon,然后启动模糊脚本时,出现以下错误:

[10:29.51] Process Monitor PED-RPC server initialized:
[10:29.51]   listening on:  0.0.0.0:26002
[10:29.51]   crash file:    /home/rico/PycharmProjects/iec104_server_fuzz/boofuzz-crash-bin
[10:29.51]   # records:     0
[10:29.51]   proc name:     None
[10:29.51]   log level:     1
[10:29.51] awaiting requests...
[10:29.55] updating target process name to './simple_server'
[10:29.55] updating stop commands to: [u'kill -SIGINT $(pidof simple_server)']
[10:29.55] updating start commands to: [u'/home/rico/iec60870/lib60870-master/lib60870-C/examples/cs104_server/simple_server']
[10:29.55] updating crash bin filename to 'boofuzz-crash-bin-2020-03-19T21-29-55'
[10:29.55] Starting target...
[10:29.55] starting target process
[10:29.55] done. waiting for start command to terminate.
APCI parameters:
 t0: 10
 t1: 15
 t2: 10
 t3: 20
 k: 12
 w: 8
 Starting server failed!
 [10:29.56] searching for process by name "./simple_server"
 Exception in thread Thread-1:
 Traceback (most recent call last):
 File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/home/rico/.local/lib/python2.7/site-packages/boofuzz/utils/debugger_thread_simple.py", line 130, in run
self.spawn_target()
File "/home/rico/.local/lib/python2.7/site-packages/boofuzz/utils/debugger_thread_simple.py", line 115, in spawn_target
self.watch()
File "/home/rico/.local/lib/python2.7/site-packages/boofuzz/utils/debugger_thread_simple.py", line 166, in watch
for (pid, name) in _enumerate_processes():
File "/home/rico/.local/lib/python2.7/site-packages/boofuzz/utils/debugger_thread_simple.py", line 36, in _enumerate_processes
yield (pid, psutil.Process(pid).name())
File "/home/rico/.local/lib/python2.7/site-packages/psutil/__init__.py", line 346, in __init__
self._init(pid)
File "/home/rico/.local/lib/python2.7/site-packages/psutil/__init__.py", line 386, in _init
raise NoSuchProcess(pid, None, msg)
NoSuchProcess: psutil.NoSuchProcess no process found with pid 21574

现在这对我来说似乎很奇怪,因为pid 21574不是正在运行的服务器进程的pid。现在有人对此有更多的了解吗?甚至大胆的猜测都值得赞赏! 如果您还需要其他信息,我会很乐意提供。

1 个答案:

答案 0 :(得分:1)

我通过删除行来修复了错误 "proc_name": '/home/rico/iec60870/lib60870-master/lib60870-C/examples/cs104_server/simple_server'在我的模糊脚本中。我还必须确保服务器不是!启动我的模糊脚本时已经运行。 现在,服务器在运行procmon的终端中启动。

我不知道是否有更好的方法来解决此问题,但至少该procmon可以做到这一点。

相关问题