Remove Obfuscated Code [20081221b]
|
Dec. 20, 2008, 07:31 PM
Post: #16
|
|||
|
|||
RE: Remove Obfuscated Code [20081220]
When the framework (aka base.cfg) will be downloadable then we could add the test to be sure we are inside a script
![]() $TST(Inside_Script=*) by me or $TST(bScript=*) by z12 (name for that variable still for decide) |
|||
Dec. 20, 2008, 09:24 PM
Post: #17
|
|||
|
|||
RE: Remove Obfuscated Code [20081220]
Could someone please check this probably infected site:
Code: http://finder.sk/ None of our variations seem to match it. Sidki's "JS Kill: Specific Escaped Code" handles it just fine and I would have expected KyeU's filter to match it also. Thanks, DarthTrader |
|||
Dec. 20, 2008, 10:34 PM
Post: #18
|
|||
|
|||
RE: Remove Obfuscated Code [20081220a]
Updated the filter again; made it able to match a combination of ascii characters and hex/decimal/octal code, such as %20function%3cname%23...
![]() |
|||
Dec. 20, 2008, 11:02 PM
Post: #19
|
|||
|
|||
RE: Remove Obfuscated Code [20081220a]
Thanks, KeyU, that seems to have done the trick! Here is your PoC link which seems to have disappeared from the first page.
![]() http://prxbx.com/test/IEXMLPoC.htm DarthTrader |
|||
Dec. 20, 2008, 11:05 PM
Post: #20
|
|||
|
|||
RE: Remove Obfuscated Code [20081220a]
I accidentally paste over the entire first post.
I found a false positive with the newest version, so I will be posting another update soon! EDIT: Updated! |
|||
Dec. 20, 2008, 11:59 PM
Post: #21
|
|||
|
|||
RE: Remove Obfuscated Code [20081220b] | |||
Dec. 21, 2008, 12:50 AM
Post: #22
|
|||
|
|||
RE: Remove Obfuscated Code [20081220b]
Kye-U, since [0-7]+{1,3) was added, the leading [0-7] is no longer needed.
This is all that is needed Code: (\\([0-7]+{1,3}&&[#000:377])) Sorry about the misunderstanding. ![]() DarthTrader, the FP's on bbr are related to title attributes, not the octal matching code above. I remember a while back bbr started to escape titles due to rendering issues. IIRC, it was related to html sometimes being inside the title attribute. z12 |
|||
Dec. 21, 2008, 01:25 AM
Post: #23
|
|||
|
|||
RE: Remove Obfuscated Code [20081220b]
Thanks, z12. Here is another suspicious page we can use for testing:
Code: http://areafen.ru/ |
|||
Dec. 21, 2008, 03:28 AM
Post: #24
|
|||
|
|||
RE: Remove Obfuscated Code [20081220b]
Thanks for the additional testbed! I'm working on having a filter general enough to match both (and the IE PoC) while having minimal false positives.
EDIT: Updated. I decided to implement lnminente's "open script/closed script" variable, and also decided to not kill the rest of the page, but remove as much obfuscated code as possible (limited to 32767 bytes) and allow the page to still load. If you're already using your own "open script/closed script" filter, feel free to modify this filter. |
|||
Dec. 21, 2008, 12:10 PM
Post: #25
|
|||
|
|||
RE: Remove Obfuscated Code [20081221a]
(Dec. 21, 2008 03:28 AM)Kye-U Wrote: Thanks for the additional testbed! I'm working on having a filter general enough to match both (and the IE PoC) while having minimal false positives. Thanks, KyeU. Your new filter seems to be working fine, although the coding is a bit over my head now. ![]() Code: [Patterns] |
|||
Dec. 21, 2008, 01:07 PM
Post: #26
|
|||
|
|||
RE: Remove Obfuscated Code [20081221a]
FP in http://support.microsoft.com/?kbid=890830
Each time we try to fix a exploit it's very difficult, thinking in executing the browser as unpriviledged user or inside sandboxie and don't worry too much about security fixes... |
|||
Dec. 21, 2008, 08:32 PM
Post: #27
|
|||
|
|||
RE: Remove Obfuscated Code [20081221b]
Updated the filter again =]
I took out the code that matches ascii text since the filter now has the ability to remove "obfuscation functions". False positives should be cut down drastically now (hopefully). |
|||
Dec. 22, 2008, 12:50 AM
Post: #28
|
|||
|
|||
RE: Remove Obfuscated Code [20081221b]
More FPs in http://www.itwire.com/
but I don't know how they can be avoided! |
|||
Dec. 22, 2008, 03:39 AM
Post: #29
|
|||
|
|||
RE: Remove Obfuscated Code [20081221b]
As long as it doesn't break the functionality of a site.
I'm thinking these aren't FPs; it's evidence that the filter does indeed remove obfuscated code, regardless of the intentions of the code. It might be safe to remove the alerts (e.g. remove \2 from the Replacement Text), and see how it goes. |
|||
Dec. 22, 2008, 06:56 AM
Post: #30
|
|||
|
|||
RE: Remove Obfuscated Code [20081221a]
(Dec. 21, 2008 12:10 PM)DarthTrader Wrote: Here's what I came up with last night:There are a few things I do not understand about the match. Why is the range of the first item matched from 0 to 377? What character has a code of 377? In the second line, why are there 2 backslashes before the x? I know that \x is a command prefix, but why the extra backslash? In the third line, why is the u not inside the first set of parentheses? Why are you trying to match at least 5 of the expressions and no less? |
|||
« Next Oldest | Next Newest »
|