rule win_regeorg_w0 { meta: description = "Webshell regeorg aspx c# version" license = "Detection Rule License 1.1 https://github.com/Neo23x0/signature-base/blob/master/LICENSE" reference = "https://github.com/sensepost/reGeorg" hash = "c1f43b7cf46ba12cfc1357b17e4f5af408740af7ae70572c9cf988ac50260ce1" author = "Arnim Rupp" date = "2021/01/11" malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.regeorg" malpedia_rule_date = "20230215" malpedia_version = "20230215" malpedia_sharing = "TLP:WHITE" malpedia_hash = "" malpedia_license = "" strings: $input_sa1 = "Request.QueryString.Get" fullword nocase wide ascii $input_sa2 = "Request.Headers.Get" fullword nocase wide ascii $sa1 = "AddressFamily.InterNetwork" fullword nocase wide ascii $sa2 = "Response.AddHeader" fullword nocase wide ascii $sa3 = "Request.InputStream.Read" nocase wide ascii $sa4 = "Response.BinaryWrite" nocase wide ascii $sa5 = "Socket" nocase wide ascii $georg = "Response.Write(\"Georg says, 'All seems fine'\")" //strings from private rule capa_asp $tagasp_short1 = /<%[^"]/ wide ascii // also looking for %> to reduce fp (yeah, short atom but seldom since special chars) $tagasp_short2 = "%>" wide ascii // classids for scripting host etc $tagasp_classid1 = "72C24DD5-D70A-438B-8A42-98424B88AFB8" nocase wide ascii $tagasp_classid2 = "F935DC22-1CF0-11D0-ADB9-00C04FD58A0B" nocase wide ascii $tagasp_classid3 = "093FF999-1EA0-4079-9525-9614C3504B74" nocase wide ascii $tagasp_classid4 = "F935DC26-1CF0-11D0-ADB9-00C04FD58A0B" nocase wide ascii $tagasp_classid5 = "0D43FE01-F093-11CF-8940-00A0C9054228" nocase wide ascii $tagasp_long10 = "<%@ " wide ascii // <% eval $tagasp_long11 = /<% \w/ nocase wide ascii $tagasp_long12 = "<%ex" nocase wide ascii $tagasp_long13 = "<%ev" nocase wide ascii // <%@ LANGUAGE = VBScript.encode%> // <%@ Language = "JScript" %> // <%@ WebHandler Language="C#" class="Handler" %> // <%@ WebService Language="C#" Class="Service" %> // <%@Page Language="Jscript"%> // <%@ Page Language = Jscript %> // <%@PAGE LANGUAGE=JSCRIPT%> // <%@ Page Language="Jscript" validateRequest="false" %> // <%@ Page Language = Jscript %> // <%@ Page Language="C#" %> // <%@ Page Language="VB" ContentType="text/html" validaterequest="false" AspCompat="true" Debug="true" %> //