Hacking - I think I have been hacked: Difference between revisions From Online Manual

Jump to: navigation, search
m (Reverted edits by Oxlo (talk) to last revision by Irisado)
Tag: Rollback
 
Line 1: Line 1:
__NOTOC__== ¡Creo que he sido Hackeado!. ¿Cómo lo compruebo? ==
__NOTOC__== I Think I Have Been Hacked. How Do I Check? ==
If any of your php files start with anything other than '''<?php''' all by itself on the line, or if an expert advises that any of your executable files have been infected with malicious code, you should be very suspicious.  If your site is unexpectedly sending users to another website or causing unexpected pop ups, if users report that your site causes malware warning or if any of your files has a more recent modified date than you expect it to have, consult an expert quickly.


Si alguno de sus archivos php comienza con algo que no sea '''<?php''' solo en la línea, o si un experto advierte que alguno de sus archivos ejecutables ha sido infectado con un código malicioso, debe sospechar mucho. Si su sitio envía inesperadamente a los usuarios a otro sitio web o genera ventanas emergentes inesperadas, si los usuarios informan que su sitio genera una advertencia de malware o si alguno de sus archivos tiene una fecha de modificación más reciente de lo que esperaba, consulte a un experto rápidamente.
== I Am Sure I Have Been Hacked, What Do I Do Now? ==
First of all, keep calm. When the forum has been hacked, there are a few simple steps for the administrator to do. Most infections can be eliminated in just a few minutes.


== Estoy seguro de que me han pirateado, ¿qué hago ahora? ==
* If you can do it quickly and easily, '''Shut down your website temporarily''' to stop any bad things happening while you are fixing the problem. See  [[#Shutting_down_your_site|instructions below]] for tips on how to do this. If you cannot shut down your site, skip this step and move on to getting rid of the problem.
En primer lugar, mantenga la calma. Cuando el foro ha sido pirateado, hay algunos pasos simples que debe seguir el administrador. La mayoría de las infecciones se pueden eliminar en solo unos minutos.


* Si puede hacerlo rápida y fácilmente, '''Cierre su sitio web temporalmente''' para evitar que ocurran más errores mientras soluciona el problema. Consulte las [[#Shutting_down_your_site|instrucciones a continuación]] para obtener sugerencias sobre cómo hacerlo. Si no puede cerrar su sitio, omita este paso y continúe para solucionar del problema.
* '''Check your desktop computer for malware'''
A virus on your PC might have given the hacker your password, or uploaded a file to your website.


* '''Revise su computadora en busca de malware'''
* '''Change all your passwords'''
Un virus en su PC podría haberle dado al hacker su contraseña o haber subido un archivo a su sitio web.
You do not know yet if any of them have been stolen.  That includes all SMF admins, ftp accounts, telnet/ssh users, hosting control panel, database, and even email. If you cannot log into your SMF admin account, see below for how to fix the problem. If you do not know how to change your database password or any other passwords associated with your hosting account, get help from your host.


* '''Cambie todas sus contraseñas'''
* '''[[Backup]] your database and your files''' (even the infected ones) and store it in a safe place.
Aún no sabe si alguna de ellas ha sido robado. Eso incluye a todos los administradores de SMF, cuentas de ftp, usuarios de telnet/ssh, Panel de Control de Alojamiento, Base de Datos e incluso correo electrónico. Si no puede iniciar sesión en su cuenta de administrador de SMF, consulte a continuación cómo solucionar el problema. Si no sabe cómo cambiar la contraseña de su Base de Datos o cualquier otra contraseña asociada con su cuenta de Servidor, obtenga ayuda del personal de su Servidor contratado.
This is important. You need to have a copy of your database in case something goes wrong. You need a backup of your attachment directory, since you cannot get those files back if you accidentally delete them. If you have any other custom file directoris, such as gallery or document storage, you must protect them too. You need to have copies of all the SMF files, so that you or someone else can figure out how you were hacked in the first place. Copy the backup files to a safe place. If you are using FTP to copy the backup files, make sure that you use binary mode.


* '''Haga [[Copia de Seguridad]] de sus archivos y Base de Datos''' (incluso de los archivos infectados) y guárdelos en un lugar seguro.
* '''Tell your host''' that you have been hacked.
Esto es importante. Necesita tener una copia de su Base de Datos en caso de que se presente algún problema. Necesita una copia de seguridad de su directorio de archivos adjuntos, ya que no puede recuperar esos archivos si los elimina accidentalmente. Si tiene otros directorios de archivos personalizados, como una galería o almacenamiento de documentos, también debe protegerlos incluyéndolos en su Copia de Seguridad. Necesita tener copia de todos los archivos SMF, para que usted o alguien más pueda descubrir cómo fue pirateado anteriormente. Guarde los archivos de copia de seguridad en un lugar seguro. Si está utilizando FTP para copiar los archivos de copia de seguridad, asegúrese de utilizar el modo binario.
Let them know about the problem. Ask them to check log files to find out where the attack may have come from. Find out what they recommend to eliminate the infection. Ask them if the malware has left any shell processes running.


* '''Digale a su Servidor''' que has sido pirateado.
* '''File a security report''' with SMF.
Hágales saber acerca del problema. Pídales que verifiquen los archivos de registro para averiguar de dónde pudo provenir el ataque. Preste atención a lo que le recomiendan para eliminar la infección. Pregúnteles si el malware ha dejado algún proceso en ejecución en el Serevidor.
If you think the hacker got in by exploiting SMF, please report it right away at [http://www.simplemachines.org/about/security.php security reports]. Please be prepared to share information about your files and your account logs, so that the developers can determine whether a vulnerability in SMF was the cause, and how to fix SMF if it needs it.  


* '''Presente un informe de seguridad''' en SMF.
* '''Delete all files''' except for your attachments and custom avatars directories (be very cautious because infected files might be in there).  Make sure your backup files are stored somewhere safe and that they do not get deleted. Ask for help if you are unsure. In addition to your SMF files, you should delete any "extra" php files, and you may need to delete .htaccess files, php.ini files, or other configuration files.  Talk to your host about this. If you cannot delete a file, talk to your host about how to fix the problem.
Si cree que el hacker entró explotando SMF, repórtelo de inmediato en [http://www.simplemachines.org/about/security.php informes de seguridad]. Esté preparado para compartir información sobre sus archivos y los registros de su cuenta, de modo que los desarrolladores de SMF puedan determinar si la causa fue una vulnerabilidad en SMF y cómo reparar SMF si fuera necesario.


* '''Eliminar todos los archivos''' excepto los archivos adjuntos y los directorios de avatares personalizados (tenga mucho cuidado porque los archivos infectados pueden estar allí). Asegúrese de que sus archivos de respaldo estén almacenados en un lugar seguro y que no se eliminen. Pida ayuda si no está seguro. Además de sus archivos SMF, debe eliminar cualquier archivo php "extra" y es posible que deba eliminar archivos .htaccess, archivos php.ini u otros archivos de configuración. Hable con su Servidor sobre esto. Si no puede eliminar un archivo, hable con su Servidor sobre cómo solucionar el problema.
* '''Replace all your SMF files''' with uninfected files.
** It is safest to use a fresh set of SMF files rather than a recent file backup. Only use '''[[Backup#Restoring_your_forum_files|your file backup]]''' if you are 100% certain that it was not infected.
** To get a fresh set of files for the same version of SMF you are already using, '''[[How to upload a fresh set of files|follow these instructions]]'''.
** If you have any custom directories (like a gallery mod directory), double check them now.
** Get a copy of Settings.php from your recent file backup, edit it to correct the password you just changed, and place a copy in your SMF directory.
** Check your SMF file permissions.  Make sure that they are secure.  Ask your host if you are not sure.
** Patch or upgrade SMF to the most recent and most secure version.
** Re-install your mods. Use [[Repair settings.php|repair_settings]] if you run into any trouble.
** Back up your files again.


* '''Reemplace todos sus archivos SMF''' con archivos no infectados.
* '''Change all your passwords again.''' Now that the infection has been removed, changing all of your passwords again is recommended in case they were stolen again before you finished eliminating the infection.
** Es más seguro utilizar un conjunto nuevo de archivos SMF en lugar de una copia de seguridad de archivos reciente. Solo use '''[[Backup#Restoring_your_forum_files|Su Copia de Segiuridad]]''' si está 100% seguro de que no está infectada.
** Para obtener un nuevo conjunto de archivos de la misma versión de SMF que ya está utilizando,'''[[How to upload a fresh set of files|siga estas instrucciones]]'''.
** Si tiene directorios personalizados (como un directorio de mod de galería), verifíquelos dos veces ahora.
** Obtenga una copia del archivo Settings.php de su copia de seguridad de archivo reciente, edítela para corregir la contraseñas que acaba de cambiar y coloque una copia en su directorio SMF.
** Verifique los permisos de su archivo SMF. Asegúrese de que estén seguros. Pregúntele a su Servidor si no está seguro de cómo deben estar.
** Parchée o actualice SMF a la versión más reciente y segura.
** Vuelva a instalar sus mods. Use[[Repair settings.php|repair_settings]] si tiene algún problema.
** Haga Copia de Seguridad de sus archivos otra vez.


* '''Cambie de nuevo todas tus contraseñas'''. Ahora que la infección ha sido eliminada, se recomienda cambiar todas tus contraseñas nuevamente en caso de que se las hayan robado de nuevo antes de terminar la eliminación de la infección.
* '''Get your website running again'''.


* '''Haga que su sitio web vuelva a funcionar'''.
== I Have Cleaned My Hacked SMF Installation. How Can I Prevent This from Happening Again? ==
Keep your SMF software up-to-date by downloading new versions whenever security fixes are available.
Apply some of the  [http://wiki.simplemachines.org/smf/Security_Tips security tips], which can help you to protect your forum from any further attacks.


== He limpiado mi instalación SMF pirateada. ¿Cómo puedo evitar que esto vuelva a suceder? ==
==Tools You Can Use==
Mantenga su software SMF actualizado descargando nuevas versiones siempre que haya soluciones de seguridad disponibles (versiones disponibles).
===If Your Admin Password No Longer Works===
Aplicar algunos de los [http://wiki.simplemachines.org/smf/Security_Tips Consejos de Seguridad], los cuales pueden ayudarle a proteger su foro de cualquier otro ataque.
See [[I_accidentally_lost_my_admin_account!_What_can_I_do#Resetting_an_admin_users_password|Resetting an admin user's password]] to find out how to set your password back to something you can use. Login, change the password again, and double-check the email address. Make sure that you had already changed your database password and the email password.  If the admin account no longer has administrator powers, or if the account has been deleted, read through [[I accidentally lost my admin account! What can I do]] for more helpful tips.


==Utilidades que puede Usar==
===Shutting Down Your Linux/Apache Site===
===Si su contraseña de Admin no funciona===
If you can alter your .htaccess file and if your site uses the Apache web server with mod_rewrite installed, you can shut down your site using these two files. First, make a copy of your .htaccess file and save it in a safe place. Then replace it with the one below and create a file called maintenance.html in the same directory. If your site does not use the Apache web server, then this method will not work. If you cannot find your .htaccess file, or if this change to your .htaccess file does not shut your site down, get support from your host.
Revise [[I_accidentally_lost_my_admin_account!_What_can_I_do#Resetting_an_admin_users_password|Reseteo de la Contraseña de un Usuario Admin]] para averiguar cómo volver a configurar su contraseña y pueda volver a usar su cuenta. Inicie sesión, cambie la contraseña nuevamente y vuelva a verificar la dirección de correo electrónico. Asegúrese de haber cambiado la contraseña de su Base de Datos y la contraseña del correo electrónico. Si la cuenta de administrador ya no tiene permisos de administrador, o si la cuenta se eliminó, lea detenidamente [[¡Accidentalmente Perdí mi cuenta de administrador! ¿Qué puedo hacer? ]] Para más consejos de ayuda.
 
===Cierre de su sitio Linux/Apache===
Si puede modificar su archivo .htaccess y si su sitio usa el servidor web Apache con mod_rewrite instalado, puede cerrar su sitio usando estos dos archivos. Primero, haga una copia de su archivo .htaccess y guárdelo en un lugar seguro. Luego reemplácelo con el siguiente y cree un archivo llamado maintenance.html en el mismo directorio. Si su sitio no utiliza el servidor web Apache, este método no funcionará. Si no puede encontrar su archivo .htaccess, o si este cambio en su archivo .htaccess no cierra su sitio, obtenga soporte de su Servidor.


'''.htaccess'''
'''.htaccess'''
Line 64: Line 63:
</html>}}
</html>}}


===Cierre de su sitio de Windows===
===Shutting Down Your Windows Site===
Si está utilizando el servidor web IIS y tiene la [http://www.iis.net/configreference/system.webserver/security/ipsecurity restricción de ipsecurity para direcciones IP y nombres de dominio] instalada y habilitada, guarde una copia de web.config , reemplácelo con el siguiente y reinicie su servidor web IIS.
If you are using the IIS webserver and have the [http://www.iis.net/configreference/system.webserver/security/ipsecurity ipsecurity restriction for IP Address and Domain Names] installed and enabled, save a copy of web.config, replace it with the one below and restart your IIS web server.
 
{{code|1=<nowiki><?xml version="1.0" encoding="UTF-8"?>
{{code|1=<nowiki><?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configuration>

Latest revision as of 09:56, 23 April 2022

I Think I Have Been Hacked. How Do I Check?

If any of your php files start with anything other than <?php all by itself on the line, or if an expert advises that any of your executable files have been infected with malicious code, you should be very suspicious. If your site is unexpectedly sending users to another website or causing unexpected pop ups, if users report that your site causes malware warning or if any of your files has a more recent modified date than you expect it to have, consult an expert quickly.

I Am Sure I Have Been Hacked, What Do I Do Now?

First of all, keep calm. When the forum has been hacked, there are a few simple steps for the administrator to do. Most infections can be eliminated in just a few minutes.

  • If you can do it quickly and easily, Shut down your website temporarily to stop any bad things happening while you are fixing the problem. See instructions below for tips on how to do this. If you cannot shut down your site, skip this step and move on to getting rid of the problem.
  • Check your desktop computer for malware

A virus on your PC might have given the hacker your password, or uploaded a file to your website.

  • Change all your passwords

You do not know yet if any of them have been stolen. That includes all SMF admins, ftp accounts, telnet/ssh users, hosting control panel, database, and even email. If you cannot log into your SMF admin account, see below for how to fix the problem. If you do not know how to change your database password or any other passwords associated with your hosting account, get help from your host.

  • Backup your database and your files (even the infected ones) and store it in a safe place.

This is important. You need to have a copy of your database in case something goes wrong. You need a backup of your attachment directory, since you cannot get those files back if you accidentally delete them. If you have any other custom file directoris, such as gallery or document storage, you must protect them too. You need to have copies of all the SMF files, so that you or someone else can figure out how you were hacked in the first place. Copy the backup files to a safe place. If you are using FTP to copy the backup files, make sure that you use binary mode.

  • Tell your host that you have been hacked.

Let them know about the problem. Ask them to check log files to find out where the attack may have come from. Find out what they recommend to eliminate the infection. Ask them if the malware has left any shell processes running.

  • File a security report with SMF.

If you think the hacker got in by exploiting SMF, please report it right away at security reports. Please be prepared to share information about your files and your account logs, so that the developers can determine whether a vulnerability in SMF was the cause, and how to fix SMF if it needs it.

  • Delete all files except for your attachments and custom avatars directories (be very cautious because infected files might be in there). Make sure your backup files are stored somewhere safe and that they do not get deleted. Ask for help if you are unsure. In addition to your SMF files, you should delete any "extra" php files, and you may need to delete .htaccess files, php.ini files, or other configuration files. Talk to your host about this. If you cannot delete a file, talk to your host about how to fix the problem.
  • Replace all your SMF files with uninfected files.
    • It is safest to use a fresh set of SMF files rather than a recent file backup. Only use your file backup if you are 100% certain that it was not infected.
    • To get a fresh set of files for the same version of SMF you are already using, follow these instructions.
    • If you have any custom directories (like a gallery mod directory), double check them now.
    • Get a copy of Settings.php from your recent file backup, edit it to correct the password you just changed, and place a copy in your SMF directory.
    • Check your SMF file permissions. Make sure that they are secure. Ask your host if you are not sure.
    • Patch or upgrade SMF to the most recent and most secure version.
    • Re-install your mods. Use repair_settings if you run into any trouble.
    • Back up your files again.
  • Change all your passwords again. Now that the infection has been removed, changing all of your passwords again is recommended in case they were stolen again before you finished eliminating the infection.
  • Get your website running again.

I Have Cleaned My Hacked SMF Installation. How Can I Prevent This from Happening Again?

Keep your SMF software up-to-date by downloading new versions whenever security fixes are available. Apply some of the security tips, which can help you to protect your forum from any further attacks.

Tools You Can Use

If Your Admin Password No Longer Works

See Resetting an admin user's password to find out how to set your password back to something you can use. Login, change the password again, and double-check the email address. Make sure that you had already changed your database password and the email password. If the admin account no longer has administrator powers, or if the account has been deleted, read through I accidentally lost my admin account! What can I do for more helpful tips.

Shutting Down Your Linux/Apache Site

If you can alter your .htaccess file and if your site uses the Apache web server with mod_rewrite installed, you can shut down your site using these two files. First, make a copy of your .htaccess file and save it in a safe place. Then replace it with the one below and create a file called maintenance.html in the same directory. If your site does not use the Apache web server, then this method will not work. If you cannot find your .htaccess file, or if this change to your .htaccess file does not shut your site down, get support from your host.

.htaccess

# Enables runtime rewriting engine
RewriteEngine on

# Show maintenance page to visitors
#RewriteCond %{REMOTE_ADDR} !^111\.111\.111\.111 # except if they come from this IP (commented out)
RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteRule $ /maintenance.html [R=503,L]

maintenance.html

<html>
<head><title>This site is undergoing maintenance</title></head>
<body>This site is undergoing maintenance</body>
</html>

Shutting Down Your Windows Site

If you are using the IIS webserver and have the ipsecurity restriction for IP Address and Domain Names installed and enabled, save a copy of web.config, replace it with the one below and restart your IIS web server.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.web>
        <identity impersonate="false" />
    </system.web>
    <system.webServer>
        <security>
            <ipSecurity allowUnlisted="false">
                <clear/>
<!--                <add ipAddress="111.111.111.111" allowed="true" /> --> <!-- Adding your own IP address would allow you to use the website, but might be dangerous to you... -->
            </ipSecurity>
        </security>
    </system.webServer>
</configuration>


Advertisement: