{"id":8488,"date":"2015-07-04T04:28:07","date_gmt":"2015-07-04T03:28:07","guid":{"rendered":"https:\/\/wp.okra.host\/article\/handling-a-hijacked-account\/"},"modified":"2021-03-07T14:25:18","modified_gmt":"2021-03-07T13:25:18","slug":"handling-a-hijacked-account","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/handling-a-hijacked-account\/","title":{"rendered":"Handling a hijacked account"},"content":{"rendered":"<h2 id=\"overview\" >\u00dcbersicht<\/h2>\n<p>This is a general document on what happens when an account is compromised, how it is compromised, and policies pertaining to resolving an account flagged for sending spam.<\/p>\n<h2 id=\"how-does-an-account-get-compromised\" >How does an account get compromised?<\/h2>\n<p>Accounts are compromised through a variety of clever engineering tactics. Just as personal software has become more powerful and smarter over the last decade, so too have the tools hackers use to compromise accounts.<\/p>\n<h3 id=\"e-mail\" >E-Mail<\/h3>\n<p>Most commonly, passwords are compromised through trial-and-error from a distributed botnet controlled by a single entity. This is called a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Botnet\">command-and-control<\/a> system whereby thousands of infected machines carry out the request of a single user. \u00a0These machines periodically try random username\/passwords\u00a0across millions of servers and report back any successful login. Eventually, if a password is weak enough, these infected machines report back a hit and your account\u00a0falls under control of a hacker.<\/p>\n<h3 id=\"websites\" >Websites<\/h3>\n<p style=\"text-align: left\">Just like e-mail, command-and-control botnets\u00a0crawl websites looking for vulnerable software. Different frameworks (WordPress, Joomla, Drupal, Ruby on Rails)\u00a0create consistent\u00a0code and use consistent login portals. Crawlers\u00a0try a variety of URL patterns to determine what a site is running.<\/p>\n<p style=\"text-align: left\"><span style=\"color: #003366\"><strong>Beispiel:<\/strong><\/span> if accessing <code>http:\/\/example.com\/wp-admin<\/code>\u00a0returns a \u00a0web page with a login form, then\u00a0example.com is probably running WordPress, because \/wp-admin is the administrative login location for WordPress. Now the attacker knows what <a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvekey.cgi?keyword=wordpress\">exploits<\/a> to try.<\/p>\n<p style=\"text-align: left\">Once an exploit has been successfully leveraged, the attacker has the ability to run any malicious\u00a0code, including editing files in place, where <a href=\"https:\/\/kb.okra.host\/de\/php\/writing-to-files\/\">permissions permit<\/a>, to install new backdoors. Whenever a website is hacked, the only safe solution is to reinstall your software from scratch and next time keep current with software updates.<\/p>\n<h4 style=\"text-align: left\" id=\"what-does-a-backdoor-look-like\" >What does a backdoor look like?<\/h4>\n<p>Backdoors are typically elusive, obfuscated code designed to confuse whoever reads it. These backdoors are almost always added at the top of infected files so as to not affect how a program, like WordPress, operates. Backdoors come in a variety of forms. Some websites below have done a great job curating backdoor samples.<\/p>\n<p><strong>Website backdoor resources<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/aw-snap.info\/articles\/backdoor-examples.php\">Examples of website backdoors<\/a><\/li>\n<li><a href=\"https:\/\/blog.sucuri.net\/2014\/02\/php-backdoors-hidden-with-clever-use-of-extract-function.html\">PHP Backdoors: Hidden with clever use of extract function<\/a><\/li>\n<li>Backdoor examples <a href=\"https:\/\/kb.sucuri.net\/malware\/signatures\/php.backdoor.arakbali.001\">1<\/a>, <a href=\"https:\/\/kb.sucuri.net\/malware\/signatures\/php.backdoor.array.001\">2<\/a>, <a href=\"https:\/\/kb.sucuri.net\/malware\/signatures\/php.backdoor.b374k-shell.001\">3<\/a>, <a href=\"https:\/\/kb.sucuri.net\/malware\/signatures\/php.backdoor.base64.001\">4<\/a>, <a href=\"https:\/\/kb.sucuri.net\/malware\/signatures\/php.backdoor.pregreplace.012\">5<\/a>, <a href=\"https:\/\/kb.sucuri.net\/malware\/signatures\/php.backdoor.gzinflate.002\">6<\/a>&#8230;<\/li>\n<\/ul>\n<h2 style=\"text-align: left\" id=\"avoiding-hacks\" >Avoiding hacks<\/h2>\n<p>You can easily avoid becoming a victim by being smart with your account. Always use\u00a0anti-virus software, keep your anti-virus software current, and follow these additional steps:<\/p>\n<h3 id=\"e-mail\" >E-Mail<\/h3>\n<ul>\n<li>Avoid creating &#8220;throwaway&#8221; accounts for testing purposes.\n<ul>\n<li><span style=\"color: #ff0000\">Beispiel<\/span>:\u00a0never create a user named &#8220;test&#8221;<\/li>\n<\/ul>\n<\/li>\n<li>Use strong passwords. Longer passwords are significantly <a href=\"https:\/\/www.grc.com\/haystack.htm\">more difficult<\/a> to guess.\n<ul>\n<li><span style=\"color: #ff0000\">Beispiel<\/span>: instead of the\u00a0password &#8220;gumby&#8221;, use\u00a0&#8220;gumbyisacharacter1&#8221;<\/li>\n<li><span style=\"color: #000080\">Erl\u00e4uterung<span style=\"color: #000000\">: Assuming guessing a-z, 0-9 (36 characters), &#8220;gumby&#8221; would take\u00a0~60 million guesses (36^5). &#8220;gumbyisacharacter1&#8221; would require\u00a01.03 x 10^28 guesses to discover. It&#8217;s significantly more secure and easy to remember.\u00a0<em>This version will not\u00a0be compromised by brute-force<\/em>.<\/span><\/span><\/li>\n<\/ul>\n<\/li>\n<li>Never use your username in a password.\n<ul>\n<li><span style=\"color: #ff0000\">Beispiel<\/span>: if you create a user named &#8220;purchasing&#8221;, don&#8217;t set the password to &#8220;purchasing1&#8221; or even &#8220;purchasing99&#8221;<\/li>\n<\/ul>\n<\/li>\n<li><strong>Always use anti-virus software<\/strong>. Some trojans (e.g. &#8220;<a href=\"http:\/\/blog.eset.ie\/2013\/01\/29\/trojan-stole-login-credentials-of-over-16000-facebook-users\/\">PokerAgent<\/a>&#8220;) simply collect login credentials and send them back to the control server without altering anything else. These are impossible to detect without anti-virus software.<\/li>\n<\/ul>\n<h3 id=\"websites\" >Websites<\/h3>\n<ul>\n<li>Use <a href=\"https:\/\/kb.okra.host\/de\/guides\/permissions-overview\/\">permission<\/a> judiciously. PHP operates as a separate user and requires permission to <a href=\"https:\/\/kb.okra.host\/de\/php\/writing-to-files\/\">write to files <\/a>on your account. It may be easier to change permissions on every file, but this is very dangerous. An attacker can modify any file on your account once compromised requiring you to reinstall the software from scratch, since any file could potentially be compromised resulting in further security violations.<\/li>\n<li>Always update your software. Exploits do happen. Updating <a href=\"https:\/\/kb.okra.host\/de\/wordpress\/updating-wordpress\/\">WordPress<\/a> und <a href=\"https:\/\/www.drupal.org\/node\/1494290\">Drupal<\/a> is extremely easy.\n<ul>\n<li>If you&#8217;re afraid of breaking something, we can update your software to the latest version\u00a0for a one-time $15 fee.<\/li>\n<\/ul>\n<\/li>\n<li>Limit the number of plugins you use on your site. Not everyone is a competent programmer.\u00a0Even competent programmers make mistakes. <strong>Always use plugins that are actively maintained<\/strong>.<\/li>\n<li><strong>Never\u00a0use pirated software<\/strong> (&#8220;nulled&#8221; themes). These themes are sometimes injected with a <a href=\"https:\/\/blog.sucuri.net\/2015\/05\/fake-jquery-scripts-in-nulled-wordpress-pugins.html\">malicious code<\/a>, like <a href=\"http:\/\/www.pcworld.com\/article\/2853192\/over-23000-web-servers-infected-with-cryptophp-backdoor.html\">CryptoPHP<\/a> to turn your website into a backdoor.<\/li>\n<\/ul>\n<h2 id=\"cleanup\" >Cleanup<\/h2>\n<p>All cleanups impose a <strong>mandatory $15 fee<\/strong>. This is to reimburse\u00a0our time spent removing spam from the server and taking steps to help you secure your service. Fees are charged automatically. Failure to collect the fee will result in a suspension of service if unpaid after\u00a072 hours.<\/p>\n<h3 id=\"e-mail\" >E-Mail<\/h3>\n<p>We participate in a variety of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Feedback_loop_(email)\">feedback loops<\/a>. When spam is reported from your e-mail address, we take steps to isolate and remove it from our network. This includes purging all mail in our mail queue sent by the affected user. Your password will be changed to a random password. You will be required to change the password for the affected user to a new password via <strong>Benutzer<\/strong> &gt; <strong>Manage Users<\/strong> innerhalb der <a href=\"https:\/\/kb.okra.host\/de\/control-panel\/logging-into-the-control-panel\/\">Bedienfeld<\/a>. <em>Never reuse the same password!<\/em><\/p>\n<h3 id=\"websites\" >Websites<\/h3>\n<p>The offending malware is removed from your site. Permissions, if too liberal, thereby allowing write-access to anywhere on your account, are tightened to prevent recurring attacks. If we cannot reasonably protect your site without your intervention, web access is revoked pending a software update.<\/p>\n<p>If an update is necessary, permissions are changed on the <a href=\"https:\/\/kb.okra.host\/de\/web-content\/where-is-site-content-served-from\/\">Dokumentenstamm<\/a> of the offending website revoking access to the web server (0700 permission mode).\u00a0This prevents access to your website to prevent further\u00a0attacks until you can update the offending software or resolve whatever vulnerability enabled the attack (usually it is <a href=\"https:\/\/cve.mitre.org\">outdated software<\/a>). Once you have updated software, <a href=\"https:\/\/kb.okra.host\/de\/guides\/permissions-overview\/\">relax permissions<\/a> by changing it back to 0755. You can do this within the control panel or <a href=\"https:\/\/kb.okra.host\/de\/ftp\/accessing-ftp-server\/\">FTP<\/a>.<\/p>\n<h2 id=\"recommended-anti-virus-software\" >Recommended anti-virus software<\/h2>\n<p><strong>Windows<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/windows.microsoft.com\/en-us\/windows\/security-essentials-download\">Microsoft Security Essentials<\/a><\/li>\n<li><a href=\"http:\/\/free.avg.com\/us-en\/homepage\">AVG<\/a><\/li>\n<\/ul>\n<p><strong>Linux<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/www.sophos.com\/en-us\/products\/free-tools\/sophos-antivirus-for-linux.aspx\">Sophos Anti-Virus<\/a><\/li>\n<li><a href=\"https:\/\/www.comodo.com\/home\/internet-security\/antivirus-for-linux.php\">Comodo<\/a><\/li>\n<\/ul>\n<p><strong>Mac<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/www.avast.com\/en-us\/free-mac-security\">Avast<\/a><\/li>\n<\/ul>\n<h2 id=\"recurring-infractions\" >Recurring infractions<\/h2>\n<p>Spam is a pervasive\u00a0problem\u00a0for our clients, as well as us. We use the same hosting servers that our clients use to\u00a0operate. It interrupts mail flow and may result in long-term reputation loss, used by some mail filtering engines (<a href=\"https:\/\/www.senderscore.org\/\">SenderScore<\/a>, <a href=\"http:\/\/www.barracudacentral.org\/reputation\">Barracuda<\/a>, <a href=\"http:\/\/www.mcafee.com\/us\/threat-center.aspx\">McAfee<\/a>, etc) to silently discard &#8220;spam&#8221; from legitimate e-mail.<\/p>\n<p>Since e-mail is such a significant medium for\u00a0business communication now, we have very strict policies on recurring infractions:<\/p>\n<ul>\n<li>3 violations in a 90-day period will result in an automatic <strong>24-hour suspension<\/strong> of service. This is to allow you to take proper steps to secure your network and computers that have access to your accounts on your network. <strong>E-mail and web site<\/strong> access is <strong>revoked<\/strong> during this window.<\/li>\n<li>A fourth\u00a0violation results in <strong>termination<\/strong> and forfeiture of any unused hosting\u00a0credit.<\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Overview This is a general document on what happens when an account is compromised, how it is compromised, and policies pertaining to resolving an account flagged for sending spam. How does an account get compromised? Accounts are compromised through a variety of clever engineering tactics. Just as personal software has&#8230;<\/p>","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[58],"ht-kb-tag":[],"class_list":["post-8488","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-e-mail"],"_links":{"self":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/comments?post=8488"}],"version-history":[{"count":1,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8488\/revisions"}],"predecessor-version":[{"id":8489,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8488\/revisions\/8489"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8488"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8488"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}