diff --git a/.travis.yml b/.travis.yml index c9745f34..f258da2e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ matrix: - name: "Python 3.7 on OSX" os: osx - osx_image: xcode11.2 + osx_image: xcode11.3 language: shell before_install: - pip3 install --upgrade pip @@ -86,13 +86,13 @@ matrix: script: - python test_pe_nu.py - # - name: "Python 3.6 on Docker" - # services: - # - docker - # before_install: - # - docker build -t qiling:1.0 . - # script: - # - docker run --privileged qiling:1.0 /bin/sh -c "cd tests && python3 test_all.py" + - name: "Python 3.6 on Docker" + services: + - docker + before_install: + - docker build -t qiling:1.0 . + script: + - docker run qiling:1.0 /bin/bash -c "cd tests && python3 test_all.py" # - name: "Python 3.6 on WSL1 Ubuntu" # os: windows diff --git a/CREDITS.TXT b/CREDITS.TXT index 60699359..478a6391 100644 --- a/CREDITS.TXT +++ b/CREDITS.TXT @@ -34,7 +34,7 @@ iamyeh Contributors (in no particular order) ===================================== klks -Kevin (chfl4gs) Foo +FOO Kevin (chfl4gs) jhumble WanderingGlitch Nguyen Hong Quang (quangnh89) @@ -48,4 +48,4 @@ iamyeh alfink bambu kabeor -0ssigeno \ No newline at end of file +0ssigeno diff --git a/Dockerfile b/Dockerfile index 2cfbdf88..da523aaf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,16 +4,15 @@ MAINTAINER "Kevin Foo " ENV DEBIAN_FRONTEND=noninteractive - RUN apt-get update \ && apt-get -y upgrade \ - && apt-get install -y python3-pip git cmake\ - && apt-get install -y vim - -COPY ./requirements.txt ./qiling/requirements.txt -RUN pip3 install -r /qiling/requirements.txt + && apt-get install -y python3-pip git vim.tiny cmake \ + && git clone https://github.com/qilingframework/qiling.git +WORKDIR /qiling +RUN pip3 install -r requirements.txt \ + && python3 setup.py install RUN pysite1=$(python3 -c "import site; print(site.getsitepackages()[0])"); \ pysite2=$(python3 -c "import site; print(site.getsitepackages()[1])")\ @@ -24,6 +23,4 @@ RUN apt-get clean \ ENV HOME /qiling -WORKDIR /qiling - CMD bash diff --git a/README.md b/README.md index e490e905..027f3189 100644 --- a/README.md +++ b/README.md @@ -52,41 +52,8 @@ Qemu usermode does similar thing to our emulator, that is to emulate whole execu --- -#### Install - -##### Local -If you are NOT using pyenv, run the command shown below to install Qiling (Python3 is required). - -``` -pip3 install -r ./requirements.txt -python3 setup.py install -``` - -If you are using pyenv, run the command shown below (or use docker). - -``` -mv $(dirname $(which python))/python2.7 $(dirname $(which python))/python2.7.bak -pip install -r ./requirements.txt -python setup.py install -``` - -##### Docker -You can build a docker container with -``` -# docker build -t quiling . -``` - -And connect to it mounting your mock filesystem with - -``` -# docker run -it -v $PWD:/qiling -v /your/path/to/mock/fs:/qiling/examples/rootfs/WINOS/Windows/SysWOW64 qiling bash -``` - -After that - -``` -python3 /qiling/setup.py install -``` +#### Installation +Please see [setup guide](docs/SETUP.md) file for how to install Qiling Framework. --- diff --git a/docs/SETUP.md b/docs/SETUP.md index 2e9937eb..4326e4d1 100644 --- a/docs/SETUP.md +++ b/docs/SETUP.md @@ -15,6 +15,13 @@ sudo pip3 install -r requirements.txt sudo python3 setup.py install ``` +If you are using pyenv, run the command shown below. +``` +mv $(dirname $(which python))/python2.7 $(dirname $(which python))/python2.7.bak +pip install -r requirements.txt +python setup.py install +``` + --- #### Important note on Windows DLLs and registry diff --git a/examples/scripts/dllscollector.bat b/examples/scripts/dllscollector.bat index e23a4f49..9b02d0f8 100644 --- a/examples/scripts/dllscollector.bat +++ b/examples/scripts/dllscollector.bat @@ -34,6 +34,18 @@ if exist %WINDIR%\SysWOW64\ntdll.dll xcopy /f /y %WINDIR%\SysWOW64\ntdll.dll "ex if exist %WINDIR%\SysWOW64\ole32.dll xcopy /f /y %WINDIR%\SysWOW64\ole32.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" if exist %WINDIR%\SysWOW64\urlmon.dll xcopy /f /y %WINDIR%\SysWOW64\urlmon.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" if exist %WINDIR%\SysWOW64\user32.dll xcopy /f /y %WINDIR%\SysWOW64\user32.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" +if exist %WINDIR%\SysWOW64\wsock32.dll xcopy /f /y %WINDIR%\SysWOW64\wsock32.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" +if exist %WINDIR%\SysWOW64\version.dll xcopy /f /y %WINDIR%\SysWOW64\version.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" +if exist %WINDIR%\SysWOW64\winmm.dll xcopy /f /y %WINDIR%\SysWOW64\winmm.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" +if exist %WINDIR%\SysWOW64\comctl32.dll xcopy /f /y %WINDIR%\SysWOW64\comctl32.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" +if exist %WINDIR%\SysWOW64\wininet.dll xcopy /f /y %WINDIR%\SysWOW64\wininet.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" +if exist %WINDIR%\SysWOW64\psapi.dll xcopy /f /y %WINDIR%\SysWOW64\psapi.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" +if exist %WINDIR%\SysWOW64\userenv.dll xcopy /f /y %WINDIR%\SysWOW64\userenv.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" +if exist %WINDIR%\SysWOW64\uxtheme.dll xcopy /f /y %WINDIR%\SysWOW64\uxtheme.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" +if exist %WINDIR%\SysWOW64\gdi32.dll xcopy /f /y %WINDIR%\SysWOW64\gdi32.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" +if exist %WINDIR%\SysWOW64\comdlg32.dll xcopy /f /y %WINDIR%\SysWOW64\comdlg32.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" +if exist %WINDIR%\SysWOW64\shell32.dll xcopy /f /y %WINDIR%\SysWOW64\shell32.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" +if exist %WINDIR%\SysWOW64\oleaut32.dll xcopy /f /y %WINDIR%\SysWOW64\oleaut32.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" if exist %WINDIR%\SysWOW64\vcruntime140.dll xcopy /f /y %WINDIR%\SysWOW64\vcruntime140.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" if exist %WINDIR%\SysWOW64\winhttp.dll xcopy /f /y %WINDIR%\SysWOW64\winhttp.dll "examples\rootfs\x86_windows\Windows\SysWOW64\" if exist %WINDIR%\SysWOW64\wininet.dll xcopy /f /y %WINDIR%\SysWOW64\wininet.dll "examples\rootfs\x86_windows\Windows\SysWOW64\"