Friday, October 21, 2022

Turn a Kali Linux into a Webhost and Launch your Phishing Attack

This is for penetration testing only, actual hackers would try other methods like hacking other websites as jumping points or use an actual web hosting site in order to avoid being tracked by the Blue Team.

I used Kali Linux on Virtual machine. This is how I  did it:

1. Create 2 command line terminals A and B

2. On terminal A, I entered the following command:

  1. sudo su
  2. ssh - keygen(it asks if you want to generate a key, but in my case I just pressed enter)
  3. ssh -R 80:localhost:80 localhost.run

The third command generated the url of the website, in my case the URL was something like this:

https://17a6e0583ae7b5.lhr.life/

On terminal 2, I entered service apache2 start and it asks for my login password and after that, the url is now active and can be accessed anywhere in the world. Initially the index page will be something like this:

 

To replace this index file with your index file, just move it to the following directory:

/var/www/html

And that's it, you can move your msfvenom payload on this directory so you can spread the phishing link. For example, the payload is payload.exe, your phishing link would be:

https://17a6e0583ae7b5.lhr.life/payload.exe

Disclaimer: This article/blog post is just for educational purposes only. 

Wednesday, October 12, 2022

Date Edit Box with calendar Dropdown in PyQt6

 This demo program shows how to create a date edit input box with a calendar dropdown and place at certain location in the window.


The output:


The code:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import sys
import os
from PyQt6.QtWidgets import QApplication,  QWidget, QDateEdit, QLabel
from PyQt6.QtCore import  QDate
from PyQt6 import QtCore, QtGui

class Window(QWidget):

    def __init__(self):
        super(Window, self).__init__()                 
        self.initUI()

    def initUI(self):
        self.date_edit = QDateEdit(self, date=QDate.currentDate(), calendarPopup=True)
        self.date_edit.setGeometry(25, 25, 150, 40)
        self.date_edit.dateChanged.connect(self.update)
        self.result_label = QLabel('', self)
        self.result_label.setGeometry(250, 25, 150, 40)
        self.setGeometry(25, 45, 350, 150)
        self.setWindowTitle('Qdateedit Tutorial')
        self.show()
    def update(self):
        value = self.date_edit.date()
        
        self.result_label.setText(str(value.toPyDate()))    
def main():

    app = QApplication(sys.argv)
    ex = Window()
    sys.exit(app.exec())


if __name__ == '__main__':
    main()