For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

AceDawg1's avatar
AceDawg1
Icon for Nimbostratus rankNimbostratus
Oct 21, 2019

iRule to TCL Conversion Script: https://support.f5.com/csp/article/K15650046

Good day all,

 

Per https://support.f5.com/csp/article/K15650046, looking to analyze a library of iRules for TCL injection vulnerabilities. Will be leveraging tclscan (https://github.com/kugg/tclscan) to do so. One of the prerequisites of tclscan is that the iRule must first be converted to its TCL equivalent.

 

Does anyone have a script that transforms an iRule into a TCL script?

1 Reply

  • take the code between the when brackets and add a tcl shebang I guess

    eg

    when HTTP_REQUEST {
    # some tcl code here
    }

    changes to:

    #!/usr/bin/tclsh
    #some tcl code here

    Though i guess it is mainly looking for expr. I used VS code and the irule plugin. I have also used regex to statically check.