cristianzsh / freki

:wolf: Malware analysis platform
https://cristian.sh/freki
GNU Affero General Public License v3.0
421 stars 58 forks source link

Running in Docker: file upload not working #12

Closed ProAdmin007 closed 3 years ago

ProAdmin007 commented 3 years ago

If I upload a file I get a 500 error. Here is the log output:

db_1 | mbind: Operation not permitted db_1 | mbind: Operation not permitted db_1 | mbind: Operation not permitted db_1 | mbind: Operation not permitted db_1 | mbind: Operation not permitted db_1 | mbind: Operation not permitted db_1 | mbind: Operation not permitted db_1 | mbind: Operation not permitted db_1 | mbind: Operation not permitted db_1 | mbind: Operation not permitted db_1 | mbind: Operation not permitted nginx_1 | 192.168.1.22 - - [06/Dec/2020:12:37:25 +0000] "GET / HTTP/1.1" 200 6169 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" "-" nginx_1 | 2020/12/06 12:37:34 [warn] 19#19: *1 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000001, client: 192.168.1.22, server: 192.168.99.100, request: "POST /scan_file HTTP/1.1", host: "192.168.1.110", referrer: "http://192.168.1.110/" freki | /usr/local/lib/python3.8/dist-packages/tzlocal/unix.py:158: UserWarning: Can not find any timezone configuration, defaulting to UTC. freki | warnings.warn('Can not find any timezone configuration, defaulting to UTC.') freki | [2020-12-06 12:37:35,618] ERROR in app: Exception on /scan_file [POST] freki | Traceback (most recent call last): freki | File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2447, in wsgi_app freki | response = self.full_dispatch_request() freki | File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1952, in full_dispatch_request freki | rv = self.handle_user_exception(e) freki | File "/usr/local/lib/python3.8/dist-packages/flask_restplus/api.py", line 584, in error_router freki | return original_handler(e) freki | File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1821, in handle_user_exception freki | reraise(exc_type, exc_value, tb) freki | File "/usr/local/lib/python3.8/dist-packages/flask/_compat.py", line 39, in reraise freki | raise value freki | File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1950, in full_dispatch_request freki | rv = self.dispatch_request() freki | File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1936, in dispatch_request freki | return self.view_functionsrule.endpoint freki | File "/usr/local/lib/python3.8/dist-packages/flask_login/utils.py", line 272, in decorated_view freki | return func(*args, **kwargs) freki | File "/freki/app/web/main.py", line 102, in scan_file freki | pe_info = pe_file.get_all() freki | File "/freki/app/core/pe.py", line 39, in get_all freki | self.get_imports() freki | File "/freki/app/core/pe.py", line 167, in get_imports freki | self.info["imports"][dll_name].append({"name" : i.name.decode(), freki | AttributeError: 'NoneType' object has no attribute 'decode' nginx_1 | 192.168.1.22 - - [06/Dec/2020:12:37:35 +0000] "POST /scan_file HTTP/1.1" 500 290 "http://192.168.1.110/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.

cristianzsh commented 3 years ago

Fixed #a799aea.

If you continue to experience this issue, please send me the sample you are analyzing.

Thank you!