2024年2月11日 星期日

How to Crack a Linux Password


https://www.freecodecamp.org/news/crack-passwords-using-john-the-ripper-pentesting-tutorial/

https://erev0s.com/blog/cracking-etcshadow-john/

How to Crack a Linux Password
Now, let's crack a Linux password. In Linux, there are two important files saved in the /etc folder: passwd and shadow.

  • /etc/passwd -> stores information like username, user id, login shell, and so on.
  • /etc/shadow -> contains password hash, password expiry, and so on.

In addition to the “john” command, John comes with a few other utilities. One of them is called “unshadow”.

The unshadow command combines the passwd and shadow files together into a single file. This can then be used by John to crack passwords.

Here is how we use the unshadow command:

$ unshadow /etc/passwd /etc/shadow > output.db

This command will combine the files together and create an output.db file. We can now crack the output.db file using John.

$ john output.db
John tries to find the password for all the users in the passwd file and generates the output with the list of cracked passwords. Again, you can use custom wordlists via the  — — wordlist flag.

沒有留言:

張貼留言

branching-strategy CASE1

以下是供不同協同作業型態客製,重新定義各分支 目的:達到不同需求不同上線時間,可進行開發與測試,需求上線可調整。 Master 分支、Develop 分支為主要分支: 不會刪除、不允許刪除,若有發生誤刪、遺失、受污染無法救回: Develop 分支 重新從Master開出分支 依...