document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <parser name="exploit_x86_shellcode" desc="example netwitness flex parser. See the following for more information: http://garygolomb.blogspot.com/2010/11/network-detection-of-x86-buffer.html ">
  2.  
  3. <!-- declaration section holds all variables used down in the <match> section -->
  4. <declaration>
  5.  
  6. <!--this parser will output messages to suspicious risk catergory -->
  7. <meta format="Text" key="risk.suspicious" name="suspicious"/>
  8.  
  9. <token name="jmp" value="&#xeb;"/>
  10.  
  11. <!--some number variables we’ll use for testing below-->
  12. <number name="num_jmp_offset" scope="session"/>
  13. <number name="num_call_1" scope="session"/>
  14. <number name="num_call_2" scope="session"/>
  15.  
  16. </declaration>
  17.  
  18. <!--enter the below node when the pattern held in “jmp" is found-->
  19. <match name="jmp">
  20.  
  21. <!--read the next byte and store the value in num_jmp_offset-->
  22. <read length="1" name="num_jmp_offset">
  23.  
  24. <!--move the value stored in num_jmp_offset -->
  25. <move direction="forward" value="$num_jmp_offset">
  26. <move direction="forward" value="1">
  27.  
  28. <!-- read the next byte, if it is 0xe8 (decimal 232), then continue -->
  29. <read length="1" name="num_call_1">
  30. <if name="num_call_1" equal="232">
  31.  
  32. <!--skip low-order address byte -->
  33. <move direction="forward" value="1">
  34.  
  35. <!--check others for values 0xff’s, meaning we’re not going far in this code-->
  36. <read length="2" name="num_call_2">
  37. <if name="num_call_2" equal="65535">
  38.  
  39. <!--if we get here, add the tag “exploit_x86_shellcode" to the suspicious catergory for this session-->
  40. <register name="suspicious" value="exploit_x86_shellcode"/>
  41.  
  42. </if>
  43. </read>
  44. </move>
  45. </if>
  46. </read>
  47. </move>
  48. </move>
  49. </read>
  50. </match>
  51. </parser>
');