Bash script to check if you have a SIP profile attached to a Virtual Server (CVE-2023-22842)

Code is community submitted, community supported, and recognized as ‘Use At Your Own Risk’.

Short Description

Generate a CSV report to know which virtual servers have a SIP profile attached. 

Problem solved by this Code Snippet

This is to shorten the time to investigate for CVE-2023-22842 for example.

How to use this Code Snippet

  1. On bash prompt:
    # vi
  2. Paste the script (see and copy below)
  3. Save the file :wq!
  4. change permission
    # chmod 777
  5. Run the script:
    # ./
  6. The output will be a CSV file under /var/tmp/sip-mapped-to-virtuals-output.csv
  7. To check the output:
    [admin@bigip:Active:Standalone] ~ # cat /var/tmp/sip-mapped-to-virtuals-output.csv
    Virtual Server, SIP Profile

Code Snippet Meta Information

Full Code Snippet

echo "Virtual Server, SIP Profile" > /var/tmp/sip_profile_map_to_virtual.csv
profile_names=`tmsh list ltm profile sip one-line | awk -F" " '{print $4}'`
for x in ${profile_names}
virtual_name=`tmsh list ltm virtual one-line | grep -w $x | awk -F" " '{print $3}'`
if [ "${virtual_name}" != "" ]
for y in ${virtual_name}
echo "$y,$x" >> /var/tmp/sip_profile_map_to_virtual.csv
Published Sep 05, 2023
Version 1.0

Was this article helpful?