caidao github
web/upload 2015. 11. 13. 16:08'web > upload' 카테고리의 다른 글
Files uploading techniques (0) | 2011.12.01 |
---|
'web'에 해당되는 글 14건caidao githubweb/upload 2015. 11. 13. 16:08'web > upload' 카테고리의 다른 글
Files uploading techniquesweb/upload 2011. 12. 1. 15:59WebShell files uploading techniques
I'm going to discuss about different techniques/methods of WEB SHELL file upload and its execution. There are few techniques (I knew), as follows, 1. Insecure HTTP method ( PUT methods ) 2. Application Flaws / Insecure server configuration (Script execution permission enabled). 3. JBOSS’s jmx-console vulnerability. 4. MySQL-XAMPP/WampServer vulnerability. 5. MS SQL command execution vulnerability. 6. Remote File Inclusion. 1. Insecure HTTP method (PUT methods) TRACE, CONNECT, DELETE, LOCK, PUT all these HTTP methods are vulnerable from security perspective. For more information go through HTTP/1.1: Method Definitions . I’ll only discuss about HTTP PUT method and its exploitability. Most of the times automated web scanners reports existence of PUT method in web server but always it’s not exploitable. For confirmation you can do the following steps, Try to upload a file with curl. (e.g. curl -T test.txt http://www.sitename.com/foldername ). If file uploaded successfully, then upload any WEB-SHELL file and browse it. If the uploaded WEB-SHELL file successfully executed on the target system then definitely you’ll get full control (logged in user level) of the machine. 2. Application Flaws / Insecure server configuration (Script execution permission enabled) Sometime web application allow file upload functionality. It can be dangerous, if file type not checked properly and script execution permission on file uploaded directory. Read the scanit’s white paper. 3. JBOSS’s jmx-console vulnerability JBoss Application Server (or JBoss AS) is a free software/open-source Java EE-based application server. Because it is Java-based, the JBoss application server operates cross-platform: usable on any operating system that supports Java. JBOSS default installation is not secure at all, there are few administrative interfaces like jmx-console, admin-console (default admin/admin) etc can be accessed without any authentication. Using those interfaces JBOSS can be hacked within a minute. nRuns published an wonderful white paper on the Hacking JBoss. 4. MySQL-XAMPP/WampServer vulnerability For MySQL-XAMPP/WampServer vulnerability read the following article, XAMPP/WampServer PHPMySQLAdmin console vulnerability. 5. MS SQL command execution vulnerability MS SQL server 2000 is vulnerable to command execution vulnerability. A nice white paper on the same is available here. 6. Remote File Inclusion Remote File Inclusion (RFI) is a type of vulnerability most often found on websites, it allows an attacker to include a remote file usually through a script on the web server. For more information read the following link. IMPORTANT: This information is for research and academic purposes only! This info is not to be abused! I am not responsible for any damage that you may create! http://netappsec.blogspot.com/2010/07/web-shell-files-uploading-techniques.html 'web > upload' 카테고리의 다른 글
쉽게쓴 sql injectionweb/injection 2010. 11. 13. 01:30'web > injection' 카테고리의 다른 글
자바 웹 어플리케이션 파일 구조web 2010. 9. 10. 17:26Project가 현재 개발하는 프로젝트명으로서 최상위 폴더입니다. 그 아래 src라는 소스 폴더가 있죠. 소스 폴더 아래에는 자바 코딩 규칙대로 회사 도메인명을 거꾸로 쓴 패키지를 사용하였습니다. user부터가 진짜 패키지명입니다. 그 아래는 ActionServlet 클래스를 넣을 action 패키지, Data Access Object를 넣을 dao 패키지, Transper Object를 넣을 to 패키지, Value Object 클래스를 넣을 vo 패키지로 나누었습니다. DynaActionForm을 사용할 것이기 때문에 ActionForm에 대한 패키지는 없습니다.
web이 웹 어플리케이션의 파일에 관련된 최상위 폴더입니다. 그 아래 당연히 WEB-INF 폴더가 있구요, 그 외에css, images, js, jsp 폴더가 있습니다. jsp는 jsp 파일이 들어갈 최상위 폴더구요. 그 아래는 각 단위 시스템 별로 폴더를 나누어서 jsp 파일을 넣으면 됩니다. 소스대로라면 user 폴더 아래에 넣으면 되겠지요. WEB-INF 파일 아래를 보시면 conf 폴더가 있습니다. 이 안에 Struts 설정 파일을 넣습니다. 그리고 lib 폴더에는 필요한 jar 파일들을 넣고요, tld 폴더에는 Struts 태그를 사용하는 데 필요한 설정 파일들을 넣습니다.
0) *.html, *.jsp, 등. - 웹 어플리케이션에서 클라이언트 브라우저로 전송이 되는 HTML 과 JSP 페이지와 다른 파일들 (예를 들면 자바스크립트, 스타일시트, 이미지 같은). 대규모 어플리케이션에서 이 파일들을 서브디렉토리 체계로 나누어 놓을 수 있습니다. 그러나 규모가 작은 어플리케이션이라면 보통은 하나의 디렉토리에서 전체를 관리하는 것이 보다 단순하고 쉽습니다.
'web' 카테고리의 다른 글
jstlweb 2010. 8. 6. 15:20'web' 카테고리의 다른 글
robots.txtweb 2010. 7. 19. 18:23- 출처
robots.txt 파일이 발견되면 파일을 읽어 그 내용을 분석한다. 로봇에 접근 권한 및 접근 가능한 경로에 대한 정보로 자신이 수집해도 되는 콘텐트만을 수집 하게 된다. 한 사이트에는 하나의 "robots.txt" 를 루트에 가질 수 있다. 로봇은 하위 디렉토리에서 이 파일을 검색하지 않는 것을 원칙으로 한다. 이 때문에 robots.txt 파일은 꼭 웹사이트의 루트에 생성해야 한다. uri는 대소문자 구별하고, "robots.txt" 파일이름은 모두 소문자로 작성해야 하며. 파일명에 공백은 허용되지 않는다. robots.txt 파일에 아래와 같이 되어있다면 해당 url에 대하여 모든 로봇에 대해 모든 경로에 접근을 차단한다는 내용이다. user-agent: * # 모든 로봇(robots)들에 적용 user-agent : 접근을 허용하지 않을 로봇을 설정 한다. disallow : 허용하지 않을 항목에 대해 설정 한다. "disallow"를 빈 값으로 설정 할 경우, 모든 하위 경로에 대한 접근이 가능하다. robots.txt 화일에는 최소한 한개의 "disallow" 필드(field)가 존재해야 한다. disallow: /help # /help.html과 /help/index.html 둘 다 허용 안함 페이지 차단하기 특정 파일 확장자를 차단 하는 방법은 robots.txt 파일에 아래와 같은 내용을 추가 하면된다. Disallow: /*.xml$ # 루트 하위에 있는 xml 확장자를 가진 모든 파일의 색인을 거부한다. 참고. 페이지의 메타태그에 아래와 같은 설정을 할 경우 로봇이 문서를 색인(index)하거나 연결을 분석하지 않는다. 내용에서 사용되는 용어들은 all, index, nofollow, noindex이다. ----------------------------------------------------------------------------------------------------------------------------------------
robots.txt 취약점
웹 사이트에서 일반적으로 사용하는 robots.txt 파일은 로봇의 검색을 제한하기 위해 만들어진 규약으로 웹 사이트에 대한 민감한 정보를 차단하기 위해서 사용됩니다. 하지만 이 파일을 역으로 이용하여 웹 사이트를 해킹할 수 있습니다. 탐색과정 로봇(google, naver, daum 등)은 웹 사이트를 검색하기 전에 robots.txt 파일이 있는지 여부를 확인한 후 그 설정에 따라서 동작합니다. 하지만 robots.txt는 강제성을 띄지 않으므로 일부 스팸 발송자나 다른 악의적인 사용자는 이 파일의 설정을 무시하고 웹 사이트를 검색할 수 있습니다. 설정 robots.txt 파일은 웹 사이트의 최상위 경로에 있어야 하며, 다른 경로에 제공 시 robots.txt의 규칙을 사용하지 못 합니다. 그리고 robots.txt에 설정하는 규칙은 아래와 같이 2 가지가 있습니다. 1. User-Agent google Google image naver yahoo Yahoo image empas msn User-Agent 설정 시 “*”로 설정하면 전체에 대한 robots 설정을 할 수 있음. 2. Disallow 대응기법 1. 관리자 페이지에 대한 접근 정책을 설정하여, 특정 IP 대역에서만 접근을 하도록 하면 보안을 강화할 수 있다. 이는 넷스케이러의 CF(Content Filtering) 기능을 통해서 간단하게 제공할 수 있다. 2. Meta tag 사용하여 robots이 웹 사이트를 검색할 때 웹 페이지에 대한 contents 수집여부 및 방식을 지정하는 규약이다. 'web' 카테고리의 다른 글
XSS wargame site -web/script 2010. 6. 14. 20:06http://xss-quiz.int21h.jp/
'web > script' 카테고리의 다른 글
XSS 참고 URLweb/script 2010. 4. 26. 14:38'web > script' 카테고리의 다른 글
Penetration Testingweb 2010. 4. 12. 02:06This section provides information for penetration testers. Some of this content is in other sections of this website already (The library). I just created this page as a quick reference. Please, if you feel I that I've missed a important link or document. The best way to find information is to use our search engine on the right. Articles: Penetration Testing for Web Applications (Part One) Penetration Testing for Web Applications (Part Two) Penetration Testing for Web Applications (Part Three) Site Sections: SQL Injection Page Cross Site Scripting (XSS) Session ID Attacks: Brute-Force Exploitation of Web Application Session IDs, November 1, 2001 (PDF) - David Endler iDefense Session Fixation Vulnerability in Web-based Applications v1.0, December 2002 (PDF) - ACROS Security Cookie Modification and Poisoning: Hacking Web Applications Using Cookie Poisoning, 2002 (PDF) - Amit Klein/sanctuminc HTTP Header Modification: Header Based Exploitation: Web Statistical Software Threats, January 2002 (TXT) - http://www.cgisecurity.com/ TCP Port 80 - HyperText Transfer Protocol (HTTP) Header Exploitation, Sept 11th 2002 (HTML) - William Bellamy Jr. CRLF Injection, (TXT) - Ulf Harnhammar Log Forensics: Fingerprinting Port 80 Attacks: A look into web server, and web application attack signatures. , November 2001 (TXT) - http://www.cgisecurity.com/ Fingerprinting Port 80 Attacks: A look into web server, and web application attack signatures: Part Two., March 2002 (TXT) (HTML) - http://www.cgisecurity.com/ Web Application Forensics: The Uncharted Territory, 2002 (PDF) - Ory Segal/sanctuminc Note: This paper has been posted for its information base only, and we in no way promote or support the products mentioned within. PHP: A Study in Scarlet: Exploiting Common Vulnerabilities in PHP Applications (TXT) (Spanish) (French) "A reprint of reminisces from the Blackhat Briefings Asia 2001" - Shaun Clowes, SecureReality Secure Programming in PHP, January 30, 2002 (HTML) - Thomas Oertli Perl: CGI/Perl Taint Mode FAQ, June 3rd, 1998 (HTML) - Gunther Birznieks Security Issues in Perl Scripts (HTML) - Jordan Dimov Misc Documentation: Application Security Assessments: Advice on Assessing your Custom Application, 2002 (HTML) - Gunter Ollmann Ethical Hacking Techniques to Audit and Secure Web-enabled Applications (PDF) - sanctuminc LDAP Injection: Are your web applications vulnerable?, July 28th 2003 (Remote Copy) - SPI LABS Application Penetration test (SAMPLE) - Imperva 출처 : http://www.cgisecurity.com 'web' 카테고리의 다른 글
HTTP/1.1 Method (HTTP 명령어)web 2010. 2. 4. 04:19HTTP/1.1 Method
서버와 클라이언트가 서로 정보를 교환하기 위한 표준 명령어로서 9가지가 있습니다. 클라이언트와 서버사이에 문서를 전달하거나 관리하기 위한 명령어입니다.
9가지 메소드
여기서 중요한 것은 GET 과 POST 명령어입니다. 나머지 명령어는 거의 사용하지 않습니다.
GET
문서의 위치를 지정하기 위한 URL과 좀 더 정확한 문서의 위치를 지정하기 위한 용도로 질의 문자열(Query String)을 가집니다. URL뒤에 정보를 같이 전송하기 때문에 정보의 량의 제한을 받습니다. 일반적으로 URL에 포함시킬 수 있는 정보량은 1024바이트입니다. URL에 정보를 같이 전송하기 때문에 보안이 취약합니다.
GET방식은 데이터가 URL끝에 key=value 형태로 전달되며 URL 뒤에 '?'를 시작으로 데이터를 전송합니다. 여러 개의 데이터를 전송할 때는 데이터 사이에 '&'기호를 사용하여 데이터를 구분합니다.
ex) test.jsp?name=value1&age=value2
POST
서버에서 정보를 전송하기 위해 정보를 받을 위치를 지정하는 URL과 전송한 정보를 HTTP 요청에 함께 포함시켜 전송합니다. 정보를 URL과 별도로 HTTP 헤더에 포함시켜 보내기 때문에 정보의 양의 제한을 적게 받습니다. 보통 <FORM>태그와 함께 사용되는 메소드입니다. POST 명령은 URL에 전송될 정보를 포함하고 있지 않아 POST로 전달된 페이지는 즐겨찾기에 등록시킬 수 없습니다. 'web' 카테고리의 다른 글
|