CLI
The following CLI interface is provided to facilitate exploitation of CBXP by shell callers.
The CLI interface for CBXP can be installed from zopen community using the
zopenpackage manager.
zopen install cbxpThe CLI interface for CBXP may also optionally be downloaded from GitHub.
cbxp extract
cbxp extract [flags] <control block>
📄 Description
Extract and format Control Block Data from Live Memory.
🚩 Flags
-
-i,--include <pattern>
Include control blocks that are Accessible from the Root Control Block being extracted using an Include Pattern. -
-f,--filter
Filter repeated control block data using a Filter.
🌐 Global Flags
-
-d,--debug
Print Debug Messages. -
-h,--help
Display Usage Information.
💻 Examples
The following example extracts the PSA control block from Live Memory and prints Debug Messages.
Shell Script
cbxp extract -d psa
The following example extracts the CVT control block from Live Memory, includes the ECVT control block and the ASVT control block, and includes all Known Control Blocks that are pointed to directly by the ASVT control block.
Shell Script
cbxp extract -i ecvt -i 'asvt.*' cvt
The following example extracts all ASSB control blocks from Live Memory where both the Control Block Field ASSBJBNI matches the Filter Value IBMUSER and the Control Block Field ASSBJBNS matches the Filter Value BPXAS. The JSON output is then piped into jq to Format it.
Shell Script
cbxp extract -f assb.assbjbni=IBMUSER assb | jq
cbxp format
cbxp format [flags] <control block>
📄 Description
Format Control Block Data from a File/Pipe.
🚩 Flags
-
-F,--file <path>
Format control block data from a specified File or Pipe. -
-o,--offset <offset>
Specify an Offset into the provided data to start formatting at.
🌐 Global Flags
-
-d,--debug
Print Debug Messages. -
-h,--help
Display Usage Information.
💻 Examples
The following example formats CVT control block data from a File and prints Debug Messages.
Shell Script
cbxp format -F cvt.bin -d cvt
The following example formats CVT control block data from a Pipe.
Shell Script
cat cvt.bin | cbxp format cvt
The following example formats ASCB control block data from a File at an offset of 0x40 bytes.
Shell Script
cbxp format -F ascboffset.bin -o 0x40 ascb
The following example formats ASCB control block data from a File at an offset of 64 bytes.
Shell Script
cbxp format -F ascboffset.bin -o 64 ascb