Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

fix packet_offset calculation, addin support for && and ; to python agent #977

Closed
wants to merge 6 commits into from

Conversation

caleb-sfdcsec
Copy link
Contributor

Resolve a bug in processing multiple commands that are stored in a packet.

The prior calculation does not include the length field in calculating the total size of the packet and so the offset is 4 bytes short.

This results in multiple commands across a single transmission failing to process properly and throwing a processTasking exception.

Solution: change packetOffset to start at 12, (2 for type + 2 for total + 2 for packet + 2 for task id + 4 for length = 12) + length value (for length of data)

@caleb-sfdcsec caleb-sfdcsec changed the title fix packet_offset calculation, by including length fix packet_offset calculation, addin support for && and ; to python agent Feb 9, 2018
@caleb-sfdcsec
Copy link
Contributor Author

adds in support for use of && and ; in python agent also;

example:
shell ls; uname
--- result ---
changelog
data
dockerfile
Linux
.. command execution completed.

Ret2lib and others added 2 commits February 9, 2018 13:51
This updates the ruby code to use fiddle library for ruby 2.3 and above while still supporting 'DL' for older versions. 'DL' is usually not found on new ruby installs.

Additionally if any errors occur when it tries to run or while it's running, they will be logged to the keylog file instead of outputed to the terminal.
stderr + ruby fiddle support
@caleb-sfdcsec
Copy link
Contributor Author

Closing, we're going to make some changes and will resubmit.

@xorrior
Copy link
Contributor

xorrior commented Feb 10, 2018

@caleb-sfdcsec Ok, thanks for the hard work

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

Successfully merging this pull request may close these issues.

3 participants