Add the exit status code to the analysis output for commands executed by scripts. #249
Labels
dynamic analysis
Issues specific to the implementation of Dynamic Analysis
enhancement
New feature or request
go
Pull requests that update Go code
Milestone
This ability can help find places where the sandbox can be improved, or be used to identify when a command being executed succeeded for failed.
The strace output generated by GVisor includes can be parsed to pair
execve
syscalls withexit
orexit_group
syscalls to extract the exit status of the executed binary.For example, below shows a sample of strace output from GVisor of syscall exits. Note the PID == 3, with TID 4 and 7 exiting explicitly using (
exit
), with the entire group being exited as well (exit_group
)The exit code is included as the strace arg to the syscall. For example, below the exit code is
0x7f
or127
:It is worth remembering in Linux that a process will first
clone
orfork
itself and then callexecve
to hand execution over to the new binary. This means the PID and TID can be parsed from the square brackets before the name (e.g.[ 3: 7]
corresponds to a PID of 3 and a TID of 7).The text was updated successfully, but these errors were encountered: