52 static int g_dce_stub_data_buffer_id = 0;
63 static int DcePayloadTest15(
void)
65 uint8_t request1[] = {
66 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
67 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
68 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
69 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
70 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
71 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x37, 0x00,
72 0x31, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
73 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
74 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
75 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
76 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
77 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
78 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
80 uint32_t request1_len =
sizeof(request1);
81 const char *sig1 =
"alert tcp any any -> any any "
82 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
83 "byte_test:2,=,14080,0,relative,dce; sid:1;)";
84 const char *sig2 =
"alert tcp any any -> any any "
85 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
86 "byte_test:2,=,46,5,relative,dce; sid:2;)";
97 memset(&f, 0,
sizeof(
Flow));
108 f.
proto = IPPROTO_TCP;
148 static int DcePayloadTest16(
void)
150 uint8_t request1[] = {
151 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
152 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
153 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
154 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
155 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
156 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x37, 0x00,
157 0x31, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
158 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
159 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
160 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
161 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
162 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
163 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
165 uint32_t request1_len =
sizeof(request1);
166 const char *sig1 =
"alert tcp any any -> any any "
167 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
168 "byte_test:2,=,55,0,relative; sid:1;)";
169 const char *sig2 =
"alert tcp any any -> any any "
170 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
171 "byte_test:2,=,11776,5,relative; sid:2;)";
181 memset(&f, 0,
sizeof(
Flow));
192 f.
proto = IPPROTO_TCP;
232 static int DcePayloadTest17(
void)
234 uint8_t request1[] = {
235 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
236 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
237 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
238 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
239 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
240 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x37, 0x00,
241 0x31, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
242 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
243 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
244 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
245 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
246 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
247 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
249 uint32_t request1_len =
sizeof(request1);
250 const char *sig1 =
"alert tcp any any -> any any "
251 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
252 "byte_test:2,=,55,0,relative,big; sid:1;)";
253 const char *sig2 =
"alert tcp any any -> any any "
254 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
255 "byte_test:2,=,46,5,relative,little; sid:2;)";
265 memset(&f, 0,
sizeof(
Flow));
276 f.
proto = IPPROTO_TCP;
316 static int DcePayloadTest18(
void)
318 uint8_t request1[] = {
319 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
320 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
321 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
322 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
323 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
324 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x03, 0x00, 0x03,
325 0x00, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
326 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
327 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
328 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
329 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
330 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
331 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
333 uint32_t request1_len =
sizeof(request1);
334 const char *sig1 =
"alert tcp any any -> any any "
335 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
336 "byte_jump:2,0,relative,dce; byte_test:2,=,46,0,relative,dce; sid:1;)";
337 const char *sig2 =
"alert tcp any any -> any any "
338 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
339 "byte_jump:2,2,relative,dce; byte_test:2,=,14080,0,relative; sid:2;)";
348 memset(&f, 0,
sizeof(
Flow));
359 f.
proto = IPPROTO_TCP;
399 static int DcePayloadTest19(
void)
401 uint8_t request1[] = {
402 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
403 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
404 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
405 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
406 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
407 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x03, 0x00,
408 0x03, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
409 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
410 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
411 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
412 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
413 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
414 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
416 uint32_t request1_len =
sizeof(request1);
417 const char *sig1 =
"alert tcp any any -> any any "
418 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
419 "byte_jump:2,0,relative; byte_test:2,=,46,0,relative,dce; sid:1;)";
420 const char *sig2 =
"alert tcp any any -> any any "
421 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
422 "byte_jump:2,2,relative; byte_test:2,=,14080,0,relative; sid:2;)";
431 memset(&f, 0,
sizeof(
Flow));
442 f.
proto = IPPROTO_TCP;
482 static int DcePayloadTest20(
void)
484 uint8_t request1[] = {
485 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
486 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
487 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
488 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
489 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
490 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x03, 0x03,
491 0x00, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
492 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
493 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
494 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
495 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
496 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
497 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
499 uint32_t request1_len =
sizeof(request1);
500 const char *sig1 =
"alert tcp any any -> any any "
501 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
502 "byte_jump:2,0,relative,big; byte_test:2,=,46,0,relative,dce; sid:1;)";
503 const char *sig2 =
"alert tcp any any -> any any "
504 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
505 "byte_jump:2,2,little,relative; byte_test:2,=,14080,0,relative; sid:2;)";
514 memset(&f, 0,
sizeof(
Flow));
525 f.
proto = IPPROTO_TCP;