File cần xóa sau khi cài xong
⚠️ Quan trọng — không xóa các file này = lộ database credentials và mở cửa cho attacker.
Auto cleanup
SL Migrations tự xóa các file sau khi step 4 thành công:
installer.phpinstaller-backup.php- Folder
slm-installer/(toàn bộ) dup-archive__*.txt,.daf,.zipdup-database__*.sql,.sql.gzdup-params__*.jsonslm-installer-csrf__*.txtslm-installer-log__*.txtslm-installer-data__*.sql
Verify thủ công
Sau khi cài xong, kiểm tra web root (qua FTP, cPanel File Manager, hoặc SSH). Nếu còn file installer hoặc file có prefix dup- hay slm-installer → xóa ngay.
Tại sao nguy hiểm
Mỗi file chứa loại dữ liệu nhạy cảm khác nhau:
| File | Chứa gì |
|---|---|
installer.php |
Script chạy SQL/file write — attacker có thể tái sử dụng |
dup-params__*.json |
Database credentials dạng plaintext |
slm-installer-csrf__*.txt |
Mật khẩu archive + CSRF tokens |
dup-database__*.sql |
Full database dump — gồm password hash users |
| Archive file | Snapshot toàn bộ site nguồn |
Nếu attacker đoán được URL (qua brute force hash) → đọc file qua HTTP → lấy database credentials → take over site.
Phòng tránh
Đặt rule chặn truy cập file installer ở tầng web server. Ví dụ với Nginx:
location ~* /(installer\.php|dup-.+\.(txt|json|sql|log)|slm-installer-.+\.txt) { deny all; return 404; }Với Apache, dùng
.htaccess:<FilesMatch "^(dup-.+\.(txt|json|sql|log)|slm-installer-.+\.txt)$"> Require all denied </FilesMatch>Verify rule hoạt động: truy cập một URL bất kỳ kiểu
https://example.com/dup-params__test.json→ phải trả về 404.Sau mỗi lần install, dành 1 phút kiểm tra file còn sót.