기본 콘텐츠로 건너뛰기

UAC 우회 기법

1. UAC 우회 기법_01

 기존 UAC 우회 기법입니다. 동작과정을 간략하게 살펴보면 다음과 같습니다.

1. UAC.tmp(.DLL)를 생성한다.
2. explorer.exe에 Code Injection을 시도한다. 이로 인해 explorer.exe는 "C:\Windows\System32\sysprep" 경로   에 위치한 cryptbase.dll 파일을 UAC.tmp로 바꾼다.
3. 악성코드가 "C:\Windows\System32\sysprep” 경로에 위치한 sysprep.exe를 실행하고 sysprep.exe에 악성       cryptbase.dll를 로드시킨다. 이때 악성코드는 종료된다.
4. cryptbase.dll은 악성코드를 관리자 권한으로 다시 실행시킨다.

 이 기술은 다음과 같은 상황에서는 UAC 경고창이 뜨지 않은 채 관리자 권한으로 승격이 가능하다는 점을 이용했습니다.

 - explorer.exe와 같은 프로그램(Windows Publisher에 의해 디지털 서명이 된 프로그램)은 관리자 권한이 필요한    작업(“C:\Windows\System32\sysprep” 경로에 DLL 이동)을 UAC 경고 없이 실행 가능하다.
 - sysprep.exe와 같이 자동 권한 상승 프로그램은 실행될 때 UAC 경고 없이 관리자 권한으로 자동 상승된다.
 - 관리자 권한으로 동작하는 프로세스에 로드된 .dll은 관리자 권한을 가진다.

 UAC 우회 기법에 대한 소스 코드 정보는 아래 링크를 참고하시기 바랍니다.



2. UAC 우회 기법_02

 최근 사용되는 UAC 우회 기법은 응용 프로그램 호환성 데이터베이스를 가진다는 특징이 있습니다. 응용 프로그램 호환성 데이터베이스는 호환성 문제가 있는 응용 프로그램을 실행할 때 규칙을 설정하는 파일로 확장명은 .sdb입니다. 악성코드는 이 메커니즘을 사용해서 UAC 문제를 해결 합니다.

1. 악성코드는 “C:\Users\ADMINI~1\AppData\LocalLow” 경로에 호환성 데이터 베이스(com.%s.sdb)와 배치 파   일(red.%s.bat)을 만든다.
2. 호환성 데이터베이스 설치 명령을 사용해 com.%s.sdb를 설치 한다.
  "%windir%\system32\sdbinst.exe" /q "C:\Users\ADMINI~1\AppData\LocalLow\com.Administrator.sdb"
3. 설치된 응용 프로그램 호환성 데이터베이스(com.%s.sdb)의 설정에 따라 iscsicli.exe가 배치 파일(red.%s.bat)을   관리자 권한으로 실행 한다.
4. red.%s.bat가 악성코드를 관리자 권한으로 다시 실행한다.

이 기술은 다음과 같이 Windows 7의 제원을 악용하여 UAC 문제를 해결합니다.

- sdbinst.exe와 iscsicli.exe 같은 자동 승격 프로그램은 프로그램 시작 시 UAC 경고 표시없이 관리자 권한으로 자   동 실행된다.
- sdbinst 명령으로 자동 승격과 같은 변경이 가능하다.

 실제로 설치되는 com.%s.sdb를 살펴보면 iscsicli.exe 실행 시 iscsicle.exe가 red.%s.bat를 실행하도록 지정된 데이터베이스임을 알 수 있습니다.


 관리자 권한으로 실행되는 red.%s.bat은 악성코드를 다시 실행시킵니다.


댓글

  1. keith titanium - Titanium Art
    ‎Design and installation · titanium bolts ‎Contact Information · ‎Design and installation · seiko titanium watch ‎Contact Information · ‎About us · chi titanium flat iron ‎Design titanium stud earrings and titanium alloy nier installation

    답글삭제

댓글 쓰기

이 블로그의 인기 게시물

dns2proxy 해킹툴

dns2proxy Offensive DNS server This tools offer a different features for post-explotation once you change the DNS server to a Victim. <Referer to help (-h) to new params options> Feature 1 Traditional DNS Spoof adding to the response the original IP address. Using spoof.cfg file: hostname ip.ip.ip.ip root@kali:~/dns2proxy# echo " www.s21sec.com  1.1.1.1" > spoof.cfg // launch in another terminal dns2proxy.py root@kali:~/dns2proxy# nslookup  www.s21sec.com  127.0.0.1 Server: 127.0.0.1 Address: 127.0.0.1#53 Name:  www.s21sec.com Address: 1.1.1.1 Name:  www.s21sec.com Address: 88.84.64.30 or you can use domains.cfg file to spoof all host of a same domain: root@kali:~/demoBH/dns2proxy# cat dominios.cfg .domain.com 192.168.1.1 root@kali:~/demoBH/dns2proxy# nslookup aaaa.domain.com 127.0.0.1 Server: 127.0.0.1 Address: 127.0.0.1#53 Name: aaaa.domain.com Address: 192.168.1.1 Hostnames at nospoof.cfg will no be spoofed. Featu...

인터넷 웹페이지 디버깅 피들러(fiddler) 사용법

인터넷 디벌깅 툴 피들러 입니다. 개발자들은 인터넷 디버깅 툴을 많이 사용하고 있는데요 인터넷 익스플러워 , 사파리 구글크롬등 디버깅 툴은 내장되어 있습니다.  하지만 원하는 값을 얻기 어렵거나 사용하기 어려운 점도 있습니다. 그래서 사용하기도 간편하고 필요한 기능도 많도 원하는 값을 쉽게 확인 할수 있는 디버깅 툴을 소개 해드리려 합니다. 알고 계시는 분도 많겠지만 피들러 (fiddler) 라는 툴입니다.  피들러에 대하 알아보도록 하겠습니다.  피들러(Fiddler) 설치 피들러 설치를 하기 위해 아래 사이트에 접속합니다.   http://www.telerik.com/fiddler 사이트에 접속하시면 FreeDownload 버튼이 보입니다. 클릭을 해서 피들러 설치를 진행합니다. ▶ 피들러는 닷넷 프레임워크를 사용하는데요 window 7 이상 제품군이시면  Fiddler for NET4을 선택하시고 미만이면 .net2를 선택 하세요  이제 Download Fiddler를 선택합니다.  ▶ 피들러 설치 진행화면이 나옵니다. I Agree를 클릭합니다.    ▶ 설치할 폴더를 선택 후 Install을 클릭합니다.    ▶ 설치가 완료되면 Close 를 클릭합니다.    ▶ 설치가 완료되면 브라우저를 새로 실행 하시고 도구> Fiddler를 선택합니다. 도구메뉴가 안보이시면 Alt를 누르시면 보입니다.    ▶ 우측에도 피들러 메뉴가 있습니다.  도구를 클릭 후 피들러를 클릭합니다.   ▶ 실행이 되면 아래와 같은 화면이 나오는데요...

보안 공부 링크

SSLsplit - SSL/TLS기반의 네트워크 포렌식 및 침투테스트(중간자공격) 도구 http://www.roe.ch/SSLsplit 가상화 서버운영 및 구축을 위한 Xenserver가 오픈소스로 공개 http://www.xenserver.org/ Python과 Fabric를 사용한 SSH 봇넷 C&C 구축 예제 http://raidersec.blogspot.kr/2013/07/building-ssh-botnet-c-using-python-and.html 파워쉘을 이용한 비밀번호 정보 획득 http://www.obscuresecurity.blogspot.kr/2013/07/get-gpppassword.html niktoHelper - Nmap의 Grepable형식을 Nikito와 연동하기 위한 파이썬 스크립트 http://milo2012.wordpress.com/2013/07/07/niktohelper-bridge-between-nmap-grepable-output-and-nikto/ 루비를 통한 심도있는 XSS 방어 방법 http://homakov.blogspot.com.es/2013/07/xss-defense-in-depth-with-rackrails-demo.html IT관련 E-Book 모음 http://www.cyberhades.com/2013/07/04/unos-libritos-tecnicos-para-el-veranito JJEncode 스크립트 분석 http://www.kahusecurity.com/2013/jjencode-script-leads-to-drive-by/ 웹브라우저 호환성 검증 및 분석결과 제공 http://www.modern.ie/ko-kr/ http://browsershots.org/ html 색상 선택 도구 https://kuler.adobe.com/create/color-wheel/ Windows 메모리 보호 메커니즘 http://resources.infosecinstitute.com/window...