eclipse/jbom

Remote Scanning on Ubuntu 22.04 Server Not Finding Active Processes

dlg1206 opened this issue · 1 comments

I reviewed JBOM a few months ago and it truly stands out from the crowd with the ability to scan active processes. I was able to scan active processes when the client / server were the same machine ( Ubuntu 22.04 Server ), but attempting to scan from another machine didn't work unfortunately.

Environment

Client: Windows 10 PC via PowerShell
Host: Ubuntu 22.04 LTS Server

To Replicate

Host

This is the example project I used. When testing locally I was able to generate an SBOM while this was running. I used mvn clean install to compile the .jar file, which I ran on the host machine

Client

I had the current latest jbom release (1.2.1) jar downloaded

  1. Ran java -jar jbom-1.2.1.jar -h HOST_ADDRESS -U MY_USERNAME -P "PASSWORD" in PowerShell

Arguments spoofed for obvious reasons, but these were the correct login credentials to SSH into the host

Output

2023-02-08 17:03:22:832 TRACE --- [jbom]
2023-02-08 17:03:22:832 TRACE --- [jbom] _ __
2023-02-08 17:03:22:834 TRACE --- [jbom] () / ____ ____ ___
2023-02-08 17:03:22:836 TRACE --- [jbom] / / __ / __ / __ `__
2023-02-08 17:03:22:837 TRACE --- [jbom] / / // / // / / / / / /
2023-02-08 17:03:22:838 TRACE --- [jbom] / /./_// // //
2023-02-08 17:03:22:839 TRACE --- [jbom] /___/
2023-02-08 17:03:22:840 TRACE --- [jbom]
2023-02-08 17:03:22:840 TRACE --- [jbom] by Contrast Security - https://contrastsecurity.com
2023-02-08 17:03:22:841 TRACE --- [jbom]
2023-02-08 17:03:22:842 TRACE --- [jbom] jbom generates SBOMs for all JVMs running on a host
2023-02-08 17:03:22:843 TRACE --- [jbom] https://github.com/Contrast-Security-OSS/jbom
2023-02-08 17:03:22:843 TRACE --- [jbom]
2023-02-08 17:03:22:844 TRACE --- [jbom] Analyzing remote JVMs on spudnik1.ddns.net
2023-02-08 17:05:11:762 TRACE --- [jbom] Connecting to HOST_ADDRESS
2023-02-08 17:05:14:700 TRACE --- [jbom] Generating 0 remote SBOMs
2023-02-08 17:05:14:701 TRACE --- [jbom] Remote Java process analysis complete
2023-02-08 17:05:14:701 TRACE --- [jbom] Saving SBOMs for HOST_ADDRESS to directory: PWD/jbom
2023-02-08 17:05:14:702 TRACE --- [jbom]
2023-02-08 17:05:14:702 TRACE --- [jbom] jbom complete

Running the commands the exact same on the host machine would result in the following:

2023-02-08 17:15:14:941 TRACE --- [jbom]
2023-02-08 17:15:14:944 TRACE --- [jbom] _ __
2023-02-08 17:15:14:944 TRACE --- [jbom] () / ____ ____ ___
2023-02-08 17:15:14:945 TRACE --- [jbom] / / __ / __ / __ `__
2023-02-08 17:15:14:945 TRACE --- [jbom] / / // / // / / / / / /
2023-02-08 17:15:14:945 TRACE --- [jbom] / /./_// // //
2023-02-08 17:15:14:946 TRACE --- [jbom] /___/
2023-02-08 17:15:14:946 TRACE --- [jbom]
2023-02-08 17:15:14:946 TRACE --- [jbom] by Contrast Security - https://contrastsecurity.com
2023-02-08 17:15:14:947 TRACE --- [jbom]
2023-02-08 17:15:14:947 TRACE --- [jbom] jbom generates SBOMs for all JVMs running on a host
2023-02-08 17:15:14:947 TRACE --- [jbom] https://github.com/Contrast-Security-OSS/jbom
2023-02-08 17:15:14:948 TRACE --- [jbom]
2023-02-08 17:15:14:948 TRACE --- [jbom] Analyzing remote JVMs on spudnik1.ddns.net
2023-02-08 17:15:21:428 TRACE --- [jbom] Connecting to HOST_ADDRESS
2023-02-08 17:15:36:266 TRACE --- [jbom] Generating 1 remote SBOM
2023-02-08 17:15:36:278 TRACE --- [jbom] - PWD/jbom-HOST_ADDRESS-PID.json
2023-02-08 17:15:36:279 TRACE --- [jbom] Remote Java process analysis complete
2023-02-08 17:15:36:279 TRACE --- [jbom] Saving SBOMs for HOST_ADDRESS to directory: PWD/jbom
2023-02-08 17:15:36:279 TRACE --- [jbom]
2023-02-08 17:15:36:280 TRACE --- [jbom] jbom complete

Hmm... so if you run it across the network it fails, but if you run it locally (but still use -H) it works. A network connection failure would explain the issue. Could you:

  • confirm that SSH works to log into the host from where you're running jbom
  • try it with the -D flag to see if there are any clues there