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;)";
99 memset(&f, 0,
sizeof(
Flow));
110 f.
proto = IPPROTO_TCP;
150 static int DcePayloadTest16(
void)
152 uint8_t request1[] = {
153 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
154 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
155 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
156 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
157 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
158 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x37, 0x00,
159 0x31, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
160 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
161 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
162 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
163 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
164 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
165 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
167 uint32_t request1_len =
sizeof(request1);
168 const char *sig1 =
"alert tcp any any -> any any "
169 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
170 "byte_test:2,=,55,0,relative; sid:1;)";
171 const char *sig2 =
"alert tcp any any -> any any "
172 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
173 "byte_test:2,=,11776,5,relative; sid:2;)";
183 memset(&f, 0,
sizeof(
Flow));
194 f.
proto = IPPROTO_TCP;
234 static int DcePayloadTest17(
void)
236 uint8_t request1[] = {
237 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
238 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
239 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
240 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
241 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
242 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x37, 0x00,
243 0x31, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
244 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
245 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
246 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
247 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
248 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
249 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
251 uint32_t request1_len =
sizeof(request1);
252 const char *sig1 =
"alert tcp any any -> any any "
253 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
254 "byte_test:2,=,55,0,relative,big; sid:1;)";
255 const char *sig2 =
"alert tcp any any -> any any "
256 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
257 "byte_test:2,=,46,5,relative,little; sid:2;)";
267 memset(&f, 0,
sizeof(
Flow));
278 f.
proto = IPPROTO_TCP;
318 static int DcePayloadTest18(
void)
320 uint8_t request1[] = {
321 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
322 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
323 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
324 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
325 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
326 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x03, 0x00, 0x03,
327 0x00, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
328 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
329 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
330 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
331 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
332 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
333 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
335 uint32_t request1_len =
sizeof(request1);
336 const char *sig1 =
"alert tcp any any -> any any "
337 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
338 "byte_jump:2,0,relative,dce; byte_test:2,=,46,0,relative,dce; sid:1;)";
339 const char *sig2 =
"alert tcp any any -> any any "
340 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
341 "byte_jump:2,2,relative,dce; byte_test:2,=,14080,0,relative; sid:2;)";
350 memset(&f, 0,
sizeof(
Flow));
361 f.
proto = IPPROTO_TCP;
401 static int DcePayloadTest19(
void)
403 uint8_t request1[] = {
404 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
405 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
406 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
407 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
408 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
409 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x03, 0x00,
410 0x03, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
411 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
412 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
413 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
414 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
415 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
416 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
418 uint32_t request1_len =
sizeof(request1);
419 const char *sig1 =
"alert tcp any any -> any any "
420 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
421 "byte_jump:2,0,relative; byte_test:2,=,46,0,relative,dce; sid:1;)";
422 const char *sig2 =
"alert tcp any any -> any any "
423 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
424 "byte_jump:2,2,relative; byte_test:2,=,14080,0,relative; sid:2;)";
433 memset(&f, 0,
sizeof(
Flow));
444 f.
proto = IPPROTO_TCP;
484 static int DcePayloadTest20(
void)
486 uint8_t request1[] = {
487 0x05, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
488 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
489 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00,
490 0x76, 0x7e, 0x32, 0x00, 0x0f, 0x00, 0x00, 0x00,
491 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
492 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x03, 0x03,
493 0x00, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x31, 0x00,
494 0x2e, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2e, 0x00,
495 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
496 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
497 0x84, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00,
498 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
499 0x14, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00
501 uint32_t request1_len =
sizeof(request1);
502 const char *sig1 =
"alert tcp any any -> any any "
503 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
504 "byte_jump:2,0,relative,big; byte_test:2,=,46,0,relative,dce; sid:1;)";
505 const char *sig2 =
"alert tcp any any -> any any "
506 "(dce_stub_data; content:\"|5c 00 5c 00 31|\"; distance:0; "
507 "byte_jump:2,2,little,relative; byte_test:2,=,14080,0,relative; sid:2;)";
516 memset(&f, 0,
sizeof(
Flow));
527 f.
proto = IPPROTO_TCP;