WHAT IS A WEBSITE

  • Computer with OS and some servers.
  • Apache, MySQL ...etc.
  • Cotains web application.
  • PHP, Python ...etc.
  • Web application is executed here and not on the client's machine.

How to hack a website?

  • An application installed on a computer.
  • ->web application pentesting
  • Computer uses an OS + other applications.
  • ->server side attacks.
  • Managed by humans.
  • ->client side attacks.

 INFORMATION GATHERING

  • IP address.
  • Domain name info.
  • Technologies used.
  • Other websites on the same server.
  • DNS records.
  • Files, sub-domains, directories.

CRAWLING SUBDOMAINS

  • Domains before the actual domain name.
  • Part of the main domain.

Ex:

  • subdomain.target.com
  • mail.google.com
  • plus.google.com
#!/usr/bin/env python

import requests
url = "baidu.com"
try:
get_response = requests.get("http://" + url)
print(get_response)
except requests.exceptions.ConnectionError:
pass

Polished Python Code:

#!/usr/bin/env python

import requests

def request(url):
try:
return requests.get("http://" + url)
except requests.exceptions.ConnectionError:
pass target_url = "baidu.com" with open("subdomains.list", "r") as wordlist_file:
for line in wordlist_file:
word = line.strip()
test_url = word + "." + target_url
response = request(test_url)
if response:
print("[+] Discovered subdomain --> " + test_url)

Python Ethical Hacking - WEB PENETRATION TESTING(1)的更多相关文章

  1. Python Ethical Hacking - WEB PENETRATION TESTING(2)

     CRAWING DIRECTORIES Directories/folders inside the web root. Can contain files or other directories ...

  2. Python Ethical Hacking - WEB PENETRATION TESTING(5)

    Guessing Login Information on Login Pages Our target website: http://10.0.0.45/dvwa/login.php #!/usr ...

  3. Python Ethical Hacking - WEB PENETRATION TESTING(4)

    CRAWING SPIDER Goal -> Recursively list all links starting from a base URL. 1. Read page HTML. 2. ...

  4. Python Ethical Hacking - WEB PENETRATION TESTING(3)

    CRAWLING SUMMARY Our crawler so far can guess: Subdomains. Directories. Files. Advantages: ->Disc ...

  5. Ethical Hacking - Web Penetration Testing(13)

    OWASP ZAP(ZED ATTACK PROXY) Automatically find vulnerabilities in web applications. Free and easy to ...

  6. Ethical Hacking - Web Penetration Testing(8)

    SQL INJECTION WHAT IS SQL? Most websites use a database to store data. Most data stored in it(userna ...

  7. Ethical Hacking - Web Penetration Testing(10)

    SQL INJECTION SQLMAP Tool designed to exploit SQL injections. Works with many DB types, MySQL, MSSQL ...

  8. Ethical Hacking - Web Penetration Testing(6)

    REMOTE FILE INCLUSION Similar to local file inclusion. But allows an attacker to read ANY file from ...

  9. Ethical Hacking - Web Penetration Testing(4)

    CODE EXECUTION VULNS Allows an attacker to execute OS commands. Windows or Linux commands. Can be us ...

随机推荐

  1. 手把手教你利用Docker+jenkins部署你的网站

    更新服务器的安装源为阿里的源,参考链接:https://blog.csdn.net/js_xh/article/details/79166655 安装docker; 1 更新资源 sudo apt-g ...

  2. postman使用小结(一)

    postman可以用来做接口测试. 下面是使用的基本步骤: 1新建http请求: 2设置请求类型get/post/put/delete...: 3设置请求的url: 4设置请求的Header头部信息, ...

  3. ceph集成openstack cinder

    本环境ceph已经搭建,ceph搭建麻烦见本博客的其他文章 1 在cinder-volume节点安装ceph client yum install -y ceph-common 注意:glance要安 ...

  4. maven跳过测试打包

    1.在执行run as时候加上参数: clean install compile -Dmaven.test.skip=true   2.在pom文件中添加如下: <plugins> < ...

  5. 【部分】ASP.NET MVC的Controller接收输入详解

    原文:https://blog.csdn.net/lxrj2008/article/details/79455360 ASP.NET mvc的Controller要正确的响应用户发出的请求就要获取到用 ...

  6. DevOps研发模式下「产品质量度量」方案实践

    在当今互联网环境下,需求变更越来越快,交付周期却越来越短, 怎么判断一个系统是否测试充分? 产品质量满足什么样的条件才能投产? 如何判断测试工作.研发团队工作的效率是高还是低? 这些问题不能靠感觉.拍 ...

  7. 错误记录——fail: Microsoft.AspNetCore.Server.Kestrel[13]

    fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HLPN4417RVEM", Request id &q ...

  8. LINUX 下 一些常用的信息显示命令:

    tcsh——shell程序,它可以在登录shell和shell 脚本命令处理器之间做命令语言解释器.stat——显示指定文件的相关信息who.w——显示在线登陆用户whoami——显示用户自己的身份h ...

  9. Flutter 中渐变的高级用法

    Flutter 中渐变有三种: LinearGradient:线性渐变 RadialGradient:放射状渐变 SweepGradient:扇形渐变 看下原图,下面的渐变都是在此图基础上完成. Li ...

  10. css transparent属性_css 透明颜色transparent的使用

    在css中 transparent到底是什么意思呢? transparent 它代表着全透明黑色,即一个类似rgba(0,0,0,0)这样的值. 例如在css属性中定义:background:tran ...