Custom App-ID SMB Signature Assistance

L0 Member

Custom App-ID SMB Signature Assistance

Hello,

I'm trying to write a custom smb signature to restrict access to certain shares. It's based on Custom App-ID for a specific SMB share

My share pattern is '\\america\credit'. Unfortunately, it didn't work for me and I opened a support case. But they asked me to post the sig. here to verify it first before they look at this further. Can some one please, check the signature ?

<application version="5.1.0">

  <entry name="smb-myshare">

    <signature>

      <entry name="s1">

        <and-condition>

          <entry name="And Condition 2">

            <or-condition>

              <entry name="Or Condition 1">

                <operator>

                  <pattern-match>

                    <pattern>\x 5c 00 5c 00 61 00 6d 00 65 00 72 00 69 00 63 00 61 00 5c 00 63 00 72 00 65 00 64 00 69 00 74 00\x</pattern>

                    <context>ms-ds-smb-req-share-name</context>

                  </pattern-match>

                </operator>

              </entry>

            </or-condition>

          </entry>

        </and-condition>

        <scope>protocol-data-unit</scope>

        <order-free>no</order-free>

        <comment>string in unicode matches "\\america\credit"</comment>

      </entry>

    </signature>

    <subcategory>storage-backup</subcategory>

    <category>business-systems</category>

    <technology>client-server</technology>

    <risk>3</risk>

    <evasive-behavior>no</evasive-behavior>

    <consume-big-bandwidth>no</consume-big-bandwidth>

    <used-by-malware>no</used-by-malware>

    <able-to-transfer-file>yes</able-to-transfer-file>

    <has-known-vulnerability>yes</has-known-vulnerability>

    <tunnel-other-application>no</tunnel-other-application>

    <tunnel-applications>no</tunnel-applications>

    <prone-to-misuse>no</prone-to-misuse>

    <pervasive-use>no</pervasive-use>

    <file-type-ident>yes</file-type-ident>

    <virus-ident>yes</virus-ident>

    <spyware-ident>no</spyware-ident>

    <data-ident>no</data-ident>

    <parent-app>ms-ds-smb</parent-app>

    <description>App-ID to identify and control access to a specific SMB share</description>

    <default>

      <port>

        <member>tcp/445</member>

        <member>udp/445</member>

        <member>tcp/139</member>

      </port>

    </default>

  </entry>

</application>

Thanks,

Alex

L6 Presenter

Re: Custom App-ID SMB Signature Assistance

I think you want to remove the <or-condition> as that will make the entry contained inside that tag optional. as i read it the signature would fire on all traffic, not just the path you want to match.

L7 Applicator

Re: Custom App-ID SMB Signature Assistance

Looking at a packet capture, the raw hex stream doesn't include spaces. So yours would be:

\x5C005C0061006D006500720069006300\x

I haven't tested this, but it may be worth a shot. I know the article linked shows spaces, but that seems odd to me because the pattern is specifying hex (using \x in front and back). Might be worth trying.

-Greg

L0 Member

Re: Custom App-ID SMB Signature Assistance

Sorry for the late post. Thank you Greg, I'll give it a shot.

Alex

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!

The Live Community thanks you for your participation!