IBM QRadar

IBM QRadar

Join this online topic group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#Security
#QRadar
#SecuringhybridcloudandAI
 View Only
Expand all | Collapse all

QRadar Custom Action Script

  • 1.  QRadar Custom Action Script

    Posted 10/08/23 10:25 AM

    Hi,

    I followed the steps in this tutorial: https://www.ibm.com/support/pages/qradar-custom-action-script-testing-scripts
    Adding the test script in Admin, adding a rule to trigger the action, and trigger that rule.
    Somehow, the test.txt is not appearing as expected.

    Wish to have some advice/help.

    Best regards,
    Tan Boon Chang



    ------------------------------
    Boon Chang Tan
    ------------------------------


  • 2.  RE: QRadar Custom Action Script

    Posted 10/09/23 05:05 AM

    Tan

    if test.txt does not show up the test script didn't execute correctly I guess.

    what about testing the script via Admin tab ? Did you execute this step ? Results?



    ------------------------------
    [Karl] [Jaeger] [Business Partner]
    [QRadar Specialist]
    [pro4bizz]
    [Karlsruhe] [Germany]
    [4972190981722]
    ------------------------------



  • 3.  RE: QRadar Custom Action Script

    Posted 10/09/23 05:19 AM

    Hi Karl,

    Executed, and it says "Execution Successful". However, the test.txt does not appear in the directory.

    Best regards,

    Tan Boon Chang



    ------------------------------
    Boon Chang Tan
    ------------------------------



  • 4.  RE: QRadar Custom Action Script

    Posted 10/09/23 06:06 AM

    Does your script look like this (it should):

    #!/bin/bash
    
    datetime="$(date)"
    echo "  Custom Action Script Test Time: $datetime" >> /home/customactionuser/test.txt
    echo "Text written to /home/customactionuser/test.txt"
    

    Because that page looks bit confusing to me.

    Also, for BASH, the file endings on the file must be UNIX (LF only) and not Windows (CR/LF)



    ------------------------------
    Paul Ford-Hutchinson
    ------------------------------



  • 5.  RE: QRadar Custom Action Script

    Posted 10/09/23 11:58 PM

    Hi Paul,

    I have implemented a script which is exactly as the one you posted.

    I am getting the message "Text written to /home/customactionuser/test.txt". However, I could not seem to find this test.txt in /home/customactionuser/.

    Refer to attached screenshot. Perhaps there is something I am missing out.

    Best regards,

    Tan Boon Chang



    ------------------------------
    Boon Chang Tan
    ------------------------------



  • 6.  RE: QRadar Custom Action Script

    Posted 10/10/23 03:17 AM

    Please review this discussion ... https://community.ibm.com/community/user/security/discussion/custom-action-account-customactionuser#bm3a6626a5-738a-4c3d-b13d-018adbac5f1b



    ------------------------------
    Paul Ford-Hutchinson
    ------------------------------



  • 7.  RE: QRadar Custom Action Script

    Posted 10/12/23 03:50 AM

    Hi Paul,

    Thank you for the reference discussion. The .txt file is now able to be seen. It seems to be recording the UTC time of when it is executed.

    How do I make it such that it executes a notification to alert users of QRadar?

    Best regards,

    Tan Boon Chang



    ------------------------------
    Boon Chang Tan
    ------------------------------



  • 8.  RE: QRadar Custom Action Script

    Posted 10/12/23 07:13 AM

    The best way to do that would be to use the "Notify" Rule Response - not the "Execute Custom Action" at all

    Paul



    ------------------------------
    Paul Ford-Hutchinson
    ------------------------------



  • 9.  RE: QRadar Custom Action Script

    Posted 10/12/23 07:51 AM

    Hi Paul,

    What kind of alerts does "Notify rule response" gives? Will it have a pop-up like system notifications?

    It will only appear in the Offenses tab right?

    Best regards,

    Tan Boon Chang



    ------------------------------
    Boon Chang Tan
    ------------------------------



  • 10.  RE: QRadar Custom Action Script

    Posted 10/18/23 06:55 AM

    Tan

    there are many options available depending on what you want

    easiest way is email, just select response Enter email addresses to noti

    what about reading doc first?

    https://www.ibm.com/docs/en/qsip/7.4?topic=rules-creating-custom-rule



    ------------------------------
    [Karl] [Jaeger] [Business Partner]
    [QRadar Specialist]
    [pro4bizz]
    [Karlsruhe] [Germany]
    [4972190981722]
    ------------------------------