trailofbits / cb-multios

DARPA Challenges Sets for Linux, Windows, and macOS
https://blog.trailofbits.com/2016/08/01/your-tool-works-better-than-mine-prove-it/
MIT License
517 stars 104 forks source link

Generate Poller #29

Closed pfsun closed 7 years ago

pfsun commented 7 years ago

Hi,

I just find these great work and it is very helpful. I have built these CGC binaries based on your approach. When I start to test these binaries, I found there were no poller. So I wonder how do you guys generate the pollers. I know there is generate-poller script in your repository. I can also use the script to generate poller for each binary. But I want to keep the same poller with your testing poller. Since I want to compare my testing results with your published results. Thanks.

krx commented 7 years ago

Hi @pfsun, I'm adding the script I use to generate the polls in #30. Whenever I go to update the spreadsheet I regenerate all the polls with this and use them on every OS.

pfsun commented 7 years ago

Great. Thanks @krx for quick response. I am trying it now.

pfsun commented 7 years ago

Hi @krx, how do you deal with the following errors. Since some generate the poller which needs the shared object file in machine.py (e.g. in build/patched/so/CROMU_00020.so). Thanks. Estadio Traceback (most recent call last): File "/var/home/psun/fla/cb-multios/tools/generate-polls/generate-polls", line 267, in main() File "/var/home/psun/fla/cb-multios/tools/generate-polls/generate-polls", line 226, in main graph.walk(current_id, total) File "/var/home/psun/fla/cb-multios/tools/generate-polls/generator/graph.py", line 231, in walk response = node() File "poller/for-release//machine.py", line 45, in start self.g = Gyre() File "poller/for-release//machine.py", line 26, in init self.dll = ctypes.CDLL('build/patched/so/CROMU_00020.so') File "/usr/lib/python2.7/ctypes/init.py", line 365, in init self._handle = _dlopen(self._name, mode) OSError: build/patched/so/CROMU_00020.so: cannot open shared object file: No such file or directory

withzombies commented 7 years ago

We ignore those.

If you absolutely need them you can use the original CGC Vagrant boxes (available here http://repo.cybergrandchallenge.com/release-cfe/) and build the unmodified DECREE examples (https://github.com/CyberGrandChallenge/samples)

pfsun commented 7 years ago

Hi @withzombies, Got it. Thanks :-)

pfsun commented 7 years ago

Thanks @krx @withzombies, I have finished the compiling and testing based on your solution. I want to share the test result with you. https://docs.google.com/spreadsheets/d/1GYsVes7RqCPwd3pQ__esszAiGLLl1dNT2JGNQ3BYgKc/edit?usp=sharing I test on Ubuntu 14.04 64bit and compiler(clang-3.9). According to the total numbers, I have less PoVs and more Pollers than yours. In my part, I have 115 binaries that passed all PoVs, and 207 binaries that passed all pollers. Based on your result, you have 146 binaries that passed all PoVs, and 166 binaries that passed all pollers. I just wonder whether you also have different results when you run different time. Thanks for your work.

demoray commented 7 years ago

@psfun different results at different times is a known issue with some challenges in CGC due to non-determinism of read and write buffers. Challenges in CFE were more reliable than CQE, as the authors were required to pass a more rigorous testing process.