Vu1nT0tal / IoT-vulhub

IoT固件漏洞复现环境
https://vulntotal-team.github.io/IoT-vulhub/
GNU General Public License v3.0
1.16k stars 171 forks source link

Problems when trying to start #13

Closed ultramar1ne closed 2 years ago

ultramar1ne commented 3 years ago

我试图从D-Link/CVE-2019- 开始 我沿着依赖关系 firmianay/ubuntu1604 -> firmianay/binwalk:noentry(noentry这个版本是?) -> firmianay/firmadyne 逐步修改了他们的Dockerfile中开头行的“From xxx”为本地docker image的值,并且一直没有报错,直到 我试图启动

issue

请问该如何启动?

ultramar1ne commented 3 years ago

@ubuntu:~/IoTVul/IoT-vulhub-master/D-Link/CVE-2019-17621$ sudo docker images REPOSITORY TAG IMAGE ID CREATED SIZE cve201917621_firmadyne-emu latest e1be3229cbc1 27 minutes ago 1.3GB firmianay/firmadyne latest 6918620551c2 30 minutes ago 1.26GB firmianay/binwalk latest 06903d97f30a 53 minutes ago 1.12GB firmianay/ubuntu1604 latest f1d008bf6830 About an hour ago 266MB ubuntu 16.04 9ff95a467e45 11 days ago 135MB

firmianay commented 3 years ago

看起来你的 cve201917621_firmadyne-emu 的输出还是 binwalk,查看这里构建 noentry:https://github.com/firmianay/IoT-vulhub/tree/master/baseImage/binwalk

ultramar1ne commented 3 years ago

您好! 在docker-compose up之后,我ssh进入容器,运行Python脚本时报错

Traceback (most recent call last):
  File "tools/exp.py", line 3, in <module>
    from pwn import *
  File "/usr/local/lib/python3.5/dist-packages/pwn/__init__.py", line 4, in <module>
    from pwn.toplevel import *
  File "/usr/local/lib/python3.5/dist-packages/pwn/toplevel.py", line 23, in <module>
    import pwnlib
  File "/usr/local/lib/python3.5/dist-packages/pwnlib/__init__.py", line 43, in <module>
    importlib.import_module('.%s' % module, 'pwnlib')
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/local/lib/python3.5/dist-packages/pwnlib/gdb.py", line 157, in <module>
    from rpyc import BgServingThread
  File "/usr/local/lib/python3.5/dist-packages/rpyc/__init__.py", line 56, in <module>
    from rpyc.utils.server import OneShotServer, ThreadedServer, ThreadPoolServer, ForkingServer
  File "/usr/local/lib/python3.5/dist-packages/rpyc/utils/server.py", line 18, in <module>
    from rpyc.utils.authenticators import AuthenticationError
  File "/usr/local/lib/python3.5/dist-packages/rpyc/utils/authenticators.py", line 36, in <module>
    class SSLAuthenticator(object):
  File "/usr/local/lib/python3.5/dist-packages/rpyc/utils/authenticators.py", line 61, in SSLAuthenticator
    ssl_version=ssl.PROTOCOL_TLS, ciphers=None):
AttributeError: module 'ssl' has no attribute 'PROTOCOL_TLS'

请问这是容器启动的问题吗?但我curl 192.168.2.2/。。。 似乎目标页面已经存在? 多谢指点

firmianay commented 3 years ago

似乎是python 3.5.2(ubuntu16.04仓库的最高版本)有问题:https://github.com/encode/uvicorn/issues/330。安装python3.6.x试试

chenxiaohe commented 3 years ago

您好! 在docker-compose up之后,我ssh进入容器,运行Python脚本时报错

Traceback (most recent call last):
  File "tools/exp.py", line 3, in <module>
    from pwn import *
  File "/usr/local/lib/python3.5/dist-packages/pwn/__init__.py", line 4, in <module>
    from pwn.toplevel import *
  File "/usr/local/lib/python3.5/dist-packages/pwn/toplevel.py", line 23, in <module>
    import pwnlib
  File "/usr/local/lib/python3.5/dist-packages/pwnlib/__init__.py", line 43, in <module>
    importlib.import_module('.%s' % module, 'pwnlib')
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/local/lib/python3.5/dist-packages/pwnlib/gdb.py", line 157, in <module>
    from rpyc import BgServingThread
  File "/usr/local/lib/python3.5/dist-packages/rpyc/__init__.py", line 56, in <module>
    from rpyc.utils.server import OneShotServer, ThreadedServer, ThreadPoolServer, ForkingServer
  File "/usr/local/lib/python3.5/dist-packages/rpyc/utils/server.py", line 18, in <module>
    from rpyc.utils.authenticators import AuthenticationError
  File "/usr/local/lib/python3.5/dist-packages/rpyc/utils/authenticators.py", line 36, in <module>
    class SSLAuthenticator(object):
  File "/usr/local/lib/python3.5/dist-packages/rpyc/utils/authenticators.py", line 61, in SSLAuthenticator
    ssl_version=ssl.PROTOCOL_TLS, ciphers=None):
AttributeError: module 'ssl' has no attribute 'PROTOCOL_TLS'

请问这是容器启动的问题吗?但我curl 192.168.2.2/。。。 似乎目标页面已经存在? 多谢指点 进入Ubuntu容器,升级python至3.6即可解决问题 可参考ubuntu16升级python3.6的教程, 链接如下: https://cloud.tencent.com/developer/article/1694210 https://blog.csdn.net/AlexTan_/article/details/108321773 若还有后续问题,可与我联系一起交流解决方案,qq与微信:1017977918