54 static int g_dce_stub_data_buffer_id = 0;
65 static int DcePayloadTest15(
void)
67 uint8_t request1[] = {
68 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
69 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
70 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
71 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
72 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
73 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x37, 0x00,
74 0x31, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
75 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
76 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
77 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
78 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
79 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
80 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
82 uint32_t request1_len =
sizeof(request1);
83 const char *sig1 =
"alert tcp any any -> any any "
84 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
85 "byte_test:2,=,14080,0,relative,dce; sid:1;)";
86 const char *sig2 =
"alert tcp any any -> any any "
87 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
88 "byte_test:2,=,46,5,relative,dce; sid:2;)";
98 memset(&f, 0,
sizeof(
Flow));
109 f.
proto = IPPROTO_TCP;
149 static int DcePayloadTest16(
void)
151 uint8_t request1[] = {
152 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
153 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
154 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
155 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
156 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
157 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x37, 0x00,
158 0x31, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
159 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
160 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
161 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
162 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
163 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
164 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
166 uint32_t request1_len =
sizeof(request1);
167 const char *sig1 =
"alert tcp any any -> any any "
168 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
169 "byte_test:2,=,55,0,relative; sid:1;)";
170 const char *sig2 =
"alert tcp any any -> any any "
171 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
172 "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;)";
264 memset(&f, 0,
sizeof(
Flow));
275 f.
proto = IPPROTO_TCP;
315 static int DcePayloadTest18(
void)
317 uint8_t request1[] = {
318 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
319 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
320 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
321 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
322 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
323 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x03, 0x00, 0x03,
324 0x00, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
325 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
326 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
327 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
328 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
329 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
330 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
332 uint32_t request1_len =
sizeof(request1);
333 const char *sig1 =
"alert tcp any any -> any any "
334 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
335 "byte_jump:2,0,relative,dce; byte_test:2,=,46,0,relative,dce; sid:1;)";
336 const char *sig2 =
"alert tcp any any -> any any "
337 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
338 "byte_jump:2,2,relative,dce; byte_test:2,=,14080,0,relative; sid:2;)";
346 memset(&f, 0,
sizeof(
Flow));
357 f.
proto = IPPROTO_TCP;
397 static int DcePayloadTest19(
void)
399 uint8_t request1[] = {
400 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
401 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
402 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
403 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
404 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
405 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x03, 0x00,
406 0x03, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
407 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
408 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
409 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
410 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
411 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
412 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
414 uint32_t request1_len =
sizeof(request1);
415 const char *sig1 =
"alert tcp any any -> any any "
416 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
417 "byte_jump:2,0,relative; byte_test:2,=,46,0,relative,dce; sid:1;)";
418 const char *sig2 =
"alert tcp any any -> any any "
419 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
420 "byte_jump:2,2,relative; byte_test:2,=,14080,0,relative; sid:2;)";
428 memset(&f, 0,
sizeof(
Flow));
439 f.
proto = IPPROTO_TCP;
479 static int DcePayloadTest20(
void)
481 uint8_t request1[] = {
482 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
483 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
484 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
485 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
486 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
487 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x03, 0x03,
488 0x00, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
489 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
490 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
491 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
492 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
493 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
494 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
496 uint32_t request1_len =
sizeof(request1);
497 const char *sig1 =
"alert tcp any any -> any any "
498 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
499 "byte_jump:2,0,relative,big; byte_test:2,=,46,0,relative,dce; sid:1;)";
500 const char *sig2 =
"alert tcp any any -> any any "
501 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
502 "byte_jump:2,2,little,relative; byte_test:2,=,14080,0,relative; sid:2;)";
510 memset(&f, 0,
sizeof(
Flow));
521 f.
proto = IPPROTO_TCP;