Troubleshooting IVR with Qualys using cURL commands

This topic provides step-by-step instructions for troubleshooting Qualys using cURL commands.

Prerequisites
  • cURL must be installed on your Windows machine. Visit the following site to download cURL: Download cURL
Installing cURL on Windows
  1. Extract the downloaded ZIP file to a location on your machine.
  2. Add cURL to System PATH:

    1. Right-click on This PC or My Computer and select Properties.
    2. Click on Advanced system settings on the right side.
    3. In the System Properties window, under the Advanced tab, click on the Environment Variables button.
    4. Under System variables, find the Path variable and select it, then click Edit.
    5. Click New and add the path where you extracted cURL, then click OK.
    6. Click OK on all windows to save your changes.
  3. Open Command Prompt and enter the following command to check the cURL version:

    curl --version
Troubleshooting Steps
  1. Checking Asset Extraction

    To check assets extraction run the following cURL command:

    curl --location --request GET "https://qualysapi.qg3.apps.qualys.com/api/2.0/fo/asset/host/vm/detection/?action=list&truncation_limit=1" --header "X-Requested-With: QualysUVM" -u "username:password"
    Note:
    • Replace the relevant Root URL in the command (e.g., https://qualysapi.qg3.apps.qualys.com)
    • Replace "username" with your actual Qualys username and password
    • This command is limited to extracting only one asset for testing purposes.

    Interpretation:

    • If the command returns data, the Qualys API is retrieving data correctly.
    • If IVR logs show no data despite the successful command, contact IVR support.
  2. Checking Vulnerability Extraction
    1. Run the following cURL command:
      curl --location --request GET "https://qualysapi.qg3.apps.qualys.com/api/2.0/fo/knowledge_base/vuln/?action=list" --header "X-Requested-With: IVR-QUALYS-ADAPTER" -u "username:password" -o output.txt
      Note:
      • Replace the relevant Root URL in the command
      • Replace "username" with your actual Qualys username and password
      • The output will be saved to a file named output.txt in the current working directory

    Interpretation:

    • If output.txt contains vulnerability details, the Qualys API is retrieving data correctly
    • If IVR logs show no data despite the successful command, contact IVR support.

Additional Notes

  • Ensure API access is granted in the Qualys account.
  • Replace placeholders in the cURL commands with actual values specific to your Qualys account and environment.

By following these steps, you can verify the functionality of the Qualys API and diagnose issues with data retrieval. If problems persist, contacting IVR support with the results from these tests will provide further assistance.