小符的CEH考证之路拾叁 - Hakcing Web server

240 阅读3分钟

CEH - 职业道德黑客 关于Hakcing Web server

  • Web Servers are the programs that are used for hosting services.Web 服务器是用于托管服务的程序。
  • Web Servers are deployed on a separate web server hardware or installed on a host as a program. It delivers content over Hyper Text Transfer Protocol (HTTP).Web 服务器部署在单独的 Web 服务器硬件上或作为程序安装在主机上。它通过超文本传输协议 (HTTP) 提供内容。
  • Web Servers support different types of application extensions whereas all of the support Hypertext Markup Language (HTML).Web 服务器支持不同类型的应用程序扩展,而所有的都支持超文本标记语言 (HTML)。

Web Server Security Issue 服务器的问题

Web server vulnerabilities: 服务器弱点

  • Improper permission of file directories 文件目录权限不正确
  • Default configurations 默认配置
  • Enabling unnecessary services 启用不必要的服务
  • Lack of security 缺乏安全保护
  • Bugs
  • Misconfigured SSL certificate 错误配置的 SSL 证书
  • Enabled debugging 启用调试

Open Source Web Servers开源网络容器

  • Apache HTTP Server
  • Nginx
  • Apache Tomcat
  • Lighttpd
  • Internet Information Services (IIS),Windows-based webserver.包括
    • Protocol listener are responsible for receiving and returning protocol-specific requests.协议侦听器负责接收和返回特定于协议的请求。
    • HTTP.sys are responsible for HTTP requests.HTTP.sys 负责 HTTP 请求。
    • World Wide Web Publishing Service (WWW Service)万维网发布服务(WWW 服务)
    • Windows Process Activation Service (WAS)Windows 进程激活服务 (WAS)

Web Server Attacks网络服务器攻击

  • DoS/DDoS
  • DNS Server Hijacking
  • DNS Amplification Attack,Spoof the source address of the DNS request, by the amplification of the size of the request and using botnets, it results a DDoS attack.欺骗DNS请求的源地址,通过放大请求的大小和使用僵尸网络,导致DDoS攻击。
  • Directory Traversal Attacks, Attacker using trials and error method to access restricted directories to reveal sensitive information.攻击者使用试错法访问受限目录以泄露敏感信息。
  • Man-in-the-Middle / Sniffing Attacks
  • Phishing Attacks
  • Website Defacement网站污损,成功入侵后,攻击者更改和修改网站的内容
  • Webserver Misconfiguration 网络服务器配置错误,攻击者寻找可利用的错误配置和漏洞。
  • HTTP Response Splitting Attack Read more here
  • Web Cache Poisoning Attack 网页缓存毒药,攻击者擦除网络服务器的实际缓存并发送精心制作的请求以存储虚假条目。
  • Web Application Attacks 网页应用攻击手段
    • Cookie Tampering
    • DoS
    • SQL Injection
    • Session Hijacking
    • Cross-Site Request Forgery (CSRF)
    • Cross-Site Scripting (XSS)
    • Buffer Overflow

Attack Methodology 攻击方法论

  • 信息收集,在互联网上搜集信息,比如通过爬虫
  • Web server Footprinting,常用工具
    • Netcraft
    • Maltego
    • httprecon
    • httrack(生产镜像网站)
  • Vulnerablities scanning 弱点扫描,常用工具
    • owasp-zap
    • openvas 通过盗取web 管理权限密码在系统中通过社会工程学等方法,对于密码方面的攻击包括:
    • Non-Electronic attacks
    • Active online attacks
    • Passive online attacks
    • Default password
    • offline attack

Countermeasures 防御方法

  • Place web server in a secure zone (behind firewall, IDS, IPS, DMZ)将 Web 服务器置于安全区域(防火墙、IDS、IPS、DMZ 之后)
  • Detect potential changes (hashing, script to detect change)检测潜在变化(哈希、检测变化的脚本)
  • Auditing ports
  • Disable insecure and unnecessary ports 禁用不安全和不必要的端口
  • Using port 443 (HTTPS) over port 80 (HTTP)
  • Encrypted traffic
  • Server certificate
  • Code Access Security Policy
  • Disable tracing 禁用跟踪
  • Disable debug complies
  • Software update
  • Disable default account 禁用默认帐户

Patch management 补丁管理

补丁管理是一个自动化过程,用于检测丢失的安全补丁、找出解决方案、下载补丁、在隔离环境中测试补丁,然后将补丁部署到系统上。 Hotfix is a small update which fix an issue. Patch is a bigger of software to fix one or more issues.Hotfix 是一个修复问题的小更新。 补丁是一个更大的软件来解决一个或多个问题。Methods:

  • Manual download

  • Auto-Update Tools:

  • Microsoft Baseline Security Analyzer (MBSA)