WithSecureLabs / snake-scales

snake-scales - the default repository of snake scales

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2 Issues about interface

fareedfauzi opened this issue · comments

Issue 1: Upload failed when using Cuckoo Interface (submit)

Situation as shown in .gif:
snake

Snake.log lines related to the situation:

[W 210211 03:16:13 snake_handler:208] upload/file - no 'file' in part
[W 210211 03:16:13 web:2105] 422 POST /upload/file (127.0.0.1) 3.87ms

Issue 2: Something wrong in the interface section

I tried to select an interface in the interface section, but nothing show.

Situation as shown in .gif:
snake2

Oooo, okay I think I know why the first one is happening I will try and replicate that on the weekend. As for the second one are you getting any errors in the console part of your web browser?

So I have looked over the code and part of me is just thinking what did past me do, this code is tragic. More motivation for me to crack on with v2 I guess.

Right okay, I have fixed the submission issue and the interface issue in Snake Skin and pushed that live to git snake-skin & snake. I have also pushed an update to the cuckoo scale in snake-scales to handle a 404, guess the cuckoo api changed?

If you have time please could you try these out and let me know if they work.

Thank you for persevering, I know this project is a bit unloved atm.

NOTE: My cuckoo api from a fresh install errored and I had to downgrage "Werkzeug==0.16"

pip install "Werkzeug==0.16"

Ok I'll try hehe. Thanks for the continuous hard work!

This error happens when I'm uploading executable with the scale option Type = interface, Scale = cuckoo, Command = submit.

image

[I 210215 03:32:40 web:2105] 200 POST /upload/file (127.0.0.1) 239.97ms
[W 210215 03:32:40 snake_handler:208] commands - no request body found
[W 210215 03:32:40 web:2105] 422 POST /commands (127.0.0.1) 1.10ms
[E 210215 03:32:40 web:1620] Uncaught exception POST /scale/undefined/interface (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:5000', method='POST', uri='/scale/undefined/interface', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/usr/local/lib/python3.8/dist-packages/tornado-5.0.1-py3.8-linux-x86_64.egg/tornado/web.py", line 1543, in _execute
        result = yield result
      File "/usr/local/lib/python3.8/dist-packages/tornado-5.0.1-py3.8-linux-x86_64.egg/tornado/gen.py", line 1099, in run
        value = future.result()
      File "/usr/local/lib/python3.8/dist-packages/snake-1.0.2-py3.8.egg/snake/routes/scale.py", line 109, in post
        _scale = scale_manager.get_scale(scale)
      File "/usr/local/lib/python3.8/dist-packages/snake-1.0.2-py3.8.egg/snake/core/scale_manager.py", line 172, in get_scale
        raise error.ScaleError('scale not found')
    snake.error.ScaleError: scale not found
[E 210215 03:32:40 web:2105] 500 POST /scale/undefined/interface (127.0.0.1) 6.45ms

Hmm, odd is this with the latest commit in snake-skin? I thought I had fixed the above in here: WithSecureLabs/snake-skin@c450ba7

Already up-to-date

snake@snake:~$ cd snake-skin/
snake@snake:~/snake-skin$ git pull
Already up to date.
snake@snake:~/snake-skin$ cd ../snake
snake@snake:~/snake$ git pull
Already up to date.

Those error happens when I'm uploading executable with the scale option Type = interface, Scale = cuckoo, Command = submit.

image

image

http://192.168.8.233:3000/api?_path=/commands:
https://pastebin.com/dQkuBcNP

Okay now I am a little confused, so that 422 error on the commands is fine, that is just the UI issuing a commands request when none are queued, nothing bad will stem from that. Are you saying that is the only issue now, or do you still have issues with interface scales?

Ohh like that. Then my issue is solved! Just realized all the sample has been uploaded in my cuckoo.