SONTAYA'P BLOGGER

IT Digital lifestyle

แกะรอย WordPress injection Site redirect "admin-ajax.php?action exploit modify siteurl somelandingpage"

แกะรอย WordPress injection Site redirect “admin-ajax.php?action exploit modify siteurl somelandingpage”

bySONTAYA March 25, 2019 Personal

ในสัปดาห์ที่ผ่านมาหลายเว็บไซต์โดน injection ทำ redirect ดูเหมือนจะเป็นการโจมตีจากแฮกเกอร์แต่จริงๆ แล้วช่องโหว่มาจากปลั๊กอิน (มีปลั๊กอินอะไรบ้าง รายละเอียดอยู่ด้านล่าง)

ช่องโหว่นี้น่าจะโดนกันเยอะครับ ซึ่งแนวทางการแก้ไขก็แตกต่างกันออกไป บางคนก็ restore เว็บไซต์กันเลยทีเดียวเนื่องจากทำได้รวดเร็ว กู้เว็บไซต์ให้กับมาให้บริการได้เร็ว เรามาแกะรอย หาแท้จริงเกิดจากอะไร? หรือเกิดขึ้นได้อย่างไร ??

ส่วนมากปัญหาเรื่อง redirect เราก็คิดว่าน่าจะโดน AdWare หรือ FTP Client ติดไวรัส พออัพโหลดไฟล์ขึ้น Server ทำให้ติด Adware แก้ไข URLซึ่งปกติก็จะ redirect ไปเว็บโป้ต่างๆ เป็นต้น (Thank you for redirect 555)

เคสในตัวอย่างนี้เปิดเว็บไซต์แล้ว redirect ไปปลายทาง
// somelandingpage.com/3gGykjDJ?frm=script
ขั้นตอนการตรวจสอบสิ่งที่เกิดขึ้น และความผิดพลาดที่พบ

1. ตรวจสอบ log http access

ให้ดาวน์โหลดไฟล์ raw log จาก cPanel หรือ DirectAdmin (กรณีใช้บริการ Shared Hositng)ส่วนใครที่ใช้ VPS ก็สามารถ SSH เข้าเครื่อง Server ดู http access ได้เลย

2. ตรวจสอบ IP address จากต้องทางที่น่าสงสัย

ให้ Search ข้อความหรือ url ที่มีการ rediret ไป จากนั้นดู Path location ของปลั๊กอินเราก็จะรู้ว่าช่องโหว่ของปลั๊กอินอะไร

หากทราบชื่อปลั๊กอินแล้วก็ให้ทำการอัพเดต หากนักพัฒนายังไม่อัพเดตปลั๊กอิน เราก็แก้ไข code เองได้เลยครับ (ของฟรี ต้องเข้าใจ 555)

ตัวอย่าง ปลั๊กอินที่พบ
remove-add-to-cart-woocommerce
woo-inquire-us-and-disable-add-to-cart-button

วิธีการแก้ไข

1. อัพเดต plugin
2. แก้ไข code
ค้นหาคำว่า “set_db_option”
/www/wp-content/plugins #  grep -r “set_db_option” *


remove-add-to-cart-woocommerce/freemius/templates/debug.php
remove-add-to-cart-woocommerce/freemius/includes/class-freemius.php

สำหรับปลั๊กอินอื่นๆ สามารถดูได้จาก GitHub เพื่ออัพเดต code ได้จากลิงก์ด้านล่างนี้
ตรวจสอบรายชื่อปลั๊กอินที่ทาง Plugin Vulnerabilities แจ้งผู้พัฒนาปลั๊กอินไปบ้างแล้ว

(Updated March 8, 2019)

  • 404 to 301 (Fixed) – 100,000+ Installs
  • Ad Blocker Notify Lite (Unfixed as of 2.2.3) – 10,000+ Installs
  • Better Notifications for WordPress (Fixed) – 20,000+ Installs
  • BuddyForms (Fixed) – 3,000+ Installs
  • Coming Soon Blocks (Coming Soon Page and Maintenance Mode for WordPress Block Editor) (Fixed) – 40+ Installs
  • Contact Form 7 Multi-Step Forms (Fixed) – 20,000+ Installs
  • Contact Form 7 Skins (Fixed) – 30,000+ Installs
  • Content Aware Sidebars (Fixed) – 40,000+ Installs
  • Delete Duplicate Posts (Fixed) – 10,000+ Installs
  • Easy Watermark (Fixed) – 30,000+ Installs
  • Final Tiles Grid Gallery (Image Photo Gallery Final Tiles Grid) (Fixed) – 30,000+ Installs
  • FooBox Image Lightbox (Fixed) – 100,000+ Installs
  • FooGallery (Fixed) – 100,000+ Installs
  • Glossary (Fixed) – 1,000+ Installs
  • Ivory Search (Unfixed as of 4.2) – 20,000+ Installs
  • Livemesh Addons for Beaver Builder (Fixed) – 2,000+ Installs
  • Livemesh Addons for Elementor (Unfixed as of 2.5.2) – 50,000+ Installs
  • Livemesh Addons for WPBakery Page Builder – (Unfixed as of 2.5.1) – 20,000+ Installs
  • Livemesh SiteOrigin Widgets (Unfixed as of 2.5.1) – 30,000+ Installs
  • Mobile Menu (WP Mobile Menu) (Fixed) – 50,000+ Installs
  • NextGEN Gallery (Fixed) – 900,000+ Installs
  • Popup Maker (Fixed) – 300,000+ Installs
  • Post Snippets (Fixed) – 30,000+ Installs
  • Remove WP Update Nags (Fixed) – 60+ Installs
  • Salon Booking System (Fixed, but originally most recent venison 3.28.3, was vulnerable) – 5,000+ Installs
  • Smart Variations Images for WooCommerce (Fixed) – 3,000+ Installs
  • Stop User Enumeration (Fixed) – 30,000+ Installs
  • Widgets for SiteOrigin (Unfixed as of 1.4.2) – 40,000+ Installs
  • WooSquare (Fixed) – 1,000+ Installs
  • WP Affiliate Disclosure (Fixed) – 100+ Installs
  • WP fail2ban (Fixed) – 30,000+ Installs
  • WP Security Audit Log (Fixed) – 80,000+ Installs

วิธีป้องกัน

1. เลือกใช้ปลั๊กอินพรีเมียม (ซื้อเถอะ)
2. อัพเดตปลั๊กอินอยู่เสมอ
3. ติดตั้งปลั๊กอินเท่าที่ใช้งาน

ระบบคลาวด์อยู่ที่ไหน?

ทำ Web Hosting แบ่งขาย?

Leave a Reply Cancel reply

You must be logged in to post a comment.

Tag Cloud

3G Android Backup Blognone Chromecast Cloud Comparison CUPS Dell DNS Facebook Firefox Firewall Google Guitar Hacked HP Joomla LGP500 LibreOffice Linux Mozilla Firefox OpenOffice.org Open Source OpenStack openSUSE openSUSE11.3 openSUSE12.1 Peplink Performance Postfix Printer Samsung Security Storage SUSE SUSE Enterprise Desktop SUSE Enterprise Server SUSE Linux Enterprise Switch Thin client Tips VMware WordPress WordPress/SMF

Comments

  • Narupon Pattapat on การ cleaning the imaging unit หรือ Drum (Imaging Unit)
  • 76Rusty on แอพ aVia Media Player Pro และ Pocket Casts 4 อนาคตอาจรองรับ Chromecast
  • JindaTheme on CloudFlare คืออะไร?
  • viva3388 on CloudFlare คืออะไร?
  • SONTAYA on Linux Foundation T-Shirt มาแล้ว

Categories

  • Android (7)
  • Joomla (9)
  • LibreOffice/OpenOffice.org (16)
  • Linux (159)
  • Music (16)
  • News (55)
  • Office (55)
  • Online Marketing (3)
  • Personal (232)
  • VMware (5)
  • WordPress/SMF (20)

Archives

  • May 2019
  • March 2019
  • January 2019
  • December 2018
  • September 2018
  • August 2018
  • July 2018
  • April 2018
  • March 2018
  • January 2018
  • December 2017
  • June 2017
  • December 2016
  • November 2016
  • April 2016
  • March 2016
  • February 2016
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • February 2015
  • January 2015
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009

Archives

  • May 2019 (1)
  • March 2019 (1)
  • January 2019 (1)
  • December 2018 (1)
  • September 2018 (1)
  • August 2018 (3)
  • July 2018 (1)
  • April 2018 (1)
  • March 2018 (1)
  • January 2018 (2)
  • December 2017 (1)
  • June 2017 (3)
  • December 2016 (1)
  • November 2016 (1)
  • April 2016 (1)
  • March 2016 (2)
  • February 2016 (1)
  • September 2015 (3)
  • August 2015 (2)
  • July 2015 (7)
  • June 2015 (5)
  • May 2015 (1)
  • April 2015 (1)
  • February 2015 (2)
  • January 2015 (1)
  • November 2014 (3)
  • October 2014 (2)
  • September 2014 (2)
  • August 2014 (1)
  • July 2014 (3)
  • June 2014 (3)
  • May 2014 (2)
  • April 2014 (5)
  • March 2014 (2)
  • February 2014 (5)
  • December 2013 (3)
  • November 2013 (15)
  • October 2013 (15)
  • September 2013 (11)
  • August 2013 (9)
  • July 2013 (26)
  • June 2013 (7)
  • May 2013 (15)
  • April 2013 (6)
  • March 2013 (5)
  • February 2013 (4)
  • January 2013 (2)
  • December 2012 (9)
  • November 2012 (2)
  • October 2012 (4)
  • September 2012 (2)
  • August 2012 (4)
  • June 2012 (3)
  • May 2012 (4)
  • April 2012 (6)
  • March 2012 (14)
  • February 2012 (9)
  • December 2011 (8)
  • November 2011 (6)
  • October 2011 (13)
  • September 2011 (7)
  • August 2011 (10)
  • July 2011 (4)
  • June 2011 (12)
  • May 2011 (26)
  • April 2011 (6)
  • March 2011 (3)
  • February 2011 (4)
  • January 2011 (10)
  • December 2010 (6)
  • November 2010 (4)
  • October 2010 (5)
  • September 2010 (10)
  • August 2010 (5)
  • July 2010 (8)
  • June 2010 (6)
  • May 2010 (4)
  • April 2010 (9)
  • March 2010 (10)
  • February 2010 (8)
  • January 2010 (21)
  • December 2009 (28)
Proudly powered by WordPress | Theme: Showme by NEThemes.