Commit e8693687 authored by Robert David Graham's avatar Robert David Graham
Browse files

netbios

parent 47345f07
Loading
Loading
Loading
Loading
+2
Changes for src/proto-banner1.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@ struct Patterns patterns[] = {
    {"\x00\x00" "**" "\xff" "SMB", 8, PROTO_SMB, SMACK_ANCHOR_BEGIN | SMACK_WILDCARDS},
    {"\x00\x00" "**" "\xfe" "SMB", 8, PROTO_SMB, SMACK_ANCHOR_BEGIN | SMACK_WILDCARDS},
    
    {"\x82\x00\x00\x00", 4, PROTO_SMB, SMACK_ANCHOR_BEGIN}, /* Positive Session Response */
    
    {"\x83\x00\x00\x01\x80", 5, PROTO_SMB, SMACK_ANCHOR_BEGIN}, /* Not listening on called name */
    {"\x83\x00\x00\x01\x81", 5, PROTO_SMB, SMACK_ANCHOR_BEGIN}, /* Not listening for calling name */
    {"\x83\x00\x00\x01\x82", 5, PROTO_SMB, SMACK_ANCHOR_BEGIN}, /* Called name not present */
+25 −16
Changes for src/proto-smb.c: 25 added lines, 16 removed lines.
Original line number Diff line number Diff line
@@ -92,6 +92,20 @@ struct SmbParams params[] = {
#define memberat(t, s, offset) (t*)((char*)(s)+(offset))


static const char
smb1_hello_template[] = {
    0x00, 0x00, 0x00, 0x45, 0xff, 0x53, 0x4d, 0x42,
    0x72, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0xc8,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00,
    0xff, 0xff, 0x00, 0x00, 0x00, 0x22, 0x00, 0x02,
    0x4e, 0x54, 0x20, 0x4c, 0x4d, 0x20, 0x30, 0x2e,
    0x31, 0x32, 0x00, 0x02, 0x53, 0x4d, 0x42, 0x20,
    0x32, 0x2e, 0x30, 0x30, 0x32, 0x00, 0x02, 0x53,
    0x4d, 0x42, 0x20, 0x32, 0x2e, 0x3f, 0x3f, 0x3f,
    0x00
    
};

static char smb1_null_session_setup[] = {
    0x00, 0x00, 0x00, 0x7e, 0xff, 0x53, 0x4d, 0x42,
@@ -1648,6 +1662,9 @@ smb_parse_record(
                        state = NBT_UNKNOWN;
                        break;
                    case 0x82:
                        tcp_transmit(more, smb1_hello_template, sizeof(smb1_hello_template), 0);
                        state = NBT_DRAIN;
                        break;
                    case 0x85:
                        state = NBT_DRAIN;
                        break;
@@ -1705,6 +1722,12 @@ smb_parse_record(
                break;
            
            case NBT_DRAIN:
                if (smb->nbt_length == 0) {
                    state = 0;
                    i--;
                } else
                    smb->nbt_length--;
                break;
            case NBT_UNKNOWN:
            default:
                break;
@@ -1770,7 +1793,7 @@ smb0_hello_template[] = {
    0x41, 0x43, 0x41, 0x43, 0x41, 0x43, 0x41, 0x43,
    0x41, 0x43, 0x41, 0x43, 0x41, 0x41, 0x41, 0x00,

    0x00, 0x00, 0x00, 0x45, 0xff, 0x53, 0x4d, 0x42,
    /*0x00, 0x00, 0x00, 0x45, 0xff, 0x53, 0x4d, 0x42,
    0x72, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0xc8,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00,
@@ -1779,7 +1802,7 @@ smb0_hello_template[] = {
    0x31, 0x32, 0x00, 0x02, 0x53, 0x4d, 0x42, 0x20,
    0x32, 0x2e, 0x30, 0x30, 0x32, 0x00, 0x02, 0x53,
    0x4d, 0x42, 0x20, 0x32, 0x2e, 0x3f, 0x3f, 0x3f,
    0x00
    0x00*/
};
static const char
smb1x_hello_template[] = {
@@ -1806,20 +1829,6 @@ xsmb1_hello_template[] = {
    0x00
};

static const char
smb1_hello_template[] = {
    0x00, 0x00, 0x00, 0x45, 0xff, 0x53, 0x4d, 0x42,
    0x72, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0xc8,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00,
    0xff, 0xff, 0x00, 0x00, 0x00, 0x22, 0x00, 0x02,
    0x4e, 0x54, 0x20, 0x4c, 0x4d, 0x20, 0x30, 0x2e,
    0x31, 0x32, 0x00, 0x02, 0x53, 0x4d, 0x42, 0x20,
    0x32, 0x2e, 0x30, 0x30, 0x32, 0x00, 0x02, 0x53,
    0x4d, 0x42, 0x20, 0x32, 0x2e, 0x3f, 0x3f, 0x3f,
    0x00

};

static const unsigned char
smb2_negot_response[] = {
−1
Changes for src/proto-x509.c: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -1357,7 +1357,6 @@ spnego_decode(struct SpnegoDecode *spnego,
                 * ready to parse the 'value'. Push the current state on the
                 * stack, then decend into the child field.
                 */
                printf("\n%u\n", x->u.tag.remaining);
                ASN1_push(x, x->brother_state, x->u.tag.remaining);
                state = x->child_state;
                memset(&x->u, 0, sizeof(x->u));