Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using the Network feature with Internet forward enabled,Failed to run plugin Pcapreader. 'int' object has no attribute 'type' #193

Open
xMarf opened this issue Jan 27, 2025 · 3 comments

Comments

@xMarf
Copy link

xMarf commented Jan 27, 2025

Describe the bug
Hi, after implementing the sandbox in a virtual machine, when I use the internet forwarding feature i get the following error:

DEBUG [cuckoo.processing.worker]: Running processing plugin. plugin=Pcapreader stage=post task_id=20250127-FF4FFT_1
2025-01-27 11:58:19 ERROR [cuckoo.processing.worker]: Failure during processing. error=Failed to run plugin Pcapreader. 'int' object has no attribute 'type' task_id=20250127-FF4FFT_1
Traceback (most recent call last):
File "/opt/cuckootest/processing/cuckoo/processing/worker.py", line 197, in _run_processing_instances
data = instance.start()
File "/opt/cuckootest/processing/cuckoo/processing/post/network.py", line 312, in start
for flow, ts, proto, sent, recv in r.process():
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/reader.py", line 130, in process
self.tcp and self.tcp.process(ts, ip, packet)
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/transport.py", line 143, in process
s.process(ts, tcp, to_server)
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/transport.py", line 423, in process
self.states[self.state](self, ts, tcp, to_server)
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/transport.py", line 342, in state_conn
self.parent.handle(
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/transport.py", line 724, in handle
while self.states[self.state](self, s, ts):
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/transport.py", line 625, in state_decrypt
self.tls.decrypt_server(record.type, record.data)
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/transport.py", line 488, in decrypt_server
return self.decrypt(self.server_state, record_type, buf)
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/transport.py", line 478, in decrypt
return bytes(self._recordLayer._decryptAndUnseal(
File "/opt/cuckootest/venv/lib/python3.10/site-packages/tlslite/recordlayer.py", line 803, in _decryptAndUnseal
authData = seqnumBytes + bytearray([header.type, self.version[0],
AttributeError: 'int' object has no attribute 'type'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/cuckootest/processing/cuckoo/processing/worker.py", line 231, in _handle_processing
_run_processing_instances(processing_instances, ctx)
File "/opt/cuckootest/processing/cuckoo/processing/worker.py", line 205, in _run_processing_instances
raise PluginError(
File "/opt/cuckootest/processing/cuckoo/processing/worker.py", line 197, in _run_processing_instances
data = instance.start()
File "/opt/cuckootest/processing/cuckoo/processing/post/network.py", line 312, in start
for flow, ts, proto, sent, recv in r.process():
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/reader.py", line 130, in process
self.tcp and self.tcp.process(ts, ip, packet)
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/transport.py", line 143, in process
s.process(ts, tcp, to_server)
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/transport.py", line 423, in process
self.states[self.state](self, ts, tcp, to_server)
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/transport.py", line 342, in state_conn
self.parent.handle(
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/transport.py", line 724, in handle
while self.states[self.state](self, s, ts):
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/transport.py", line 625, in state_decrypt
self.tls.decrypt_server(record.type, record.data)
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/transport.py", line 488, in decrypt_server
return self.decrypt(self.server_state, record_type, buf)
File "/opt/cuckootest/venv/lib/python3.10/site-packages/httpreplay/transport.py", line 478, in decrypt
return bytes(self._recordLayer._decryptAndUnseal(
File "/opt/cuckootest/venv/lib/python3.10/site-packages/tlslite/recordlayer.py", line 803, in _decryptAndUnseal
authData = seqnumBytes + bytearray([header.type, self.version[0],
cuckoo.processing.errors.PluginError: Failed to run plugin Pcapreader. 'int' object has no attribute 'type'

To Reproduce
I am using the cuckoorooter feature enabling the forwarding in Internet.
Terminal 1: cuckoorooter -g pcap --debug
Terminal 2: cuckoo --debug
Also i'm testing it with an eicar file, this one https://www.eicar.org/download/eicar-com-2-2/?wpdmdl=8848&refresh=67977acc80ae71737980620.

Edit:
if I use the "drop" function I don't get any errors, but if I use the "Internet" function i get them.

Expected behavior
That it completes the analysis and does not return any errors to me

** My Cuckoo version and operating system are::**
Cuckoo 3.0.1, Ubuntu 22.04.5 LTS

@triinsa
Copy link

triinsa commented Jan 27, 2025

@xMarf Thank you for reporting the issue.
Unfortunately, we have not had this error before, we are investigating what could have caused it.

@amine177
Copy link

amine177 commented Jan 28, 2025

I also faced this problem when network is enabled. self.recv holds an int instead of some object with .type ..

It happens both at decrypt_client and decrypt_server ...

@xMarf
Copy link
Author

xMarf commented Jan 29, 2025

I have the problem only if I use the "Internet" function, the network configuration is enabled and if I use the "Drop" function there are no problems.
I also noticed that all the methods called have the ts parameter in common, could the configuration have something to do with it?

I also faced this problem when network is enabled. self.recv holds an int instead of some object with .type ..

It happens both at decrypt_client and decrypt_server ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants