UNDERCODE COMMUNITY
2.67K subscribers
1.23K photos
31 videos
2.65K files
79.5K links
πŸ¦‘ Undercode Cyber World!
@UndercodeCommunity


1️⃣ World first platform which Collect & Analyzes every New hacking method.
+ AI Pratice
@Undercode_Testing

2️⃣ Cyber & Tech NEWS:
@Undercode_News

3️⃣ CVE @Daily_CVE

✨ Web & Services:
β†’ Undercode.help
Download Telegram
some new & old hacking methodes :)
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘πŸ•΅οΈβ€β™‚οΈ How to display banner / message before OpenSSH authentication :


Want to display a message or banner before OpenSSH authentication (SSHD server)?

1) Try this simple trick to show an ASCII banner or logo on your Linux or Unix system.

3) OpenSSH has a built-in configuration option called Banner.

4) The contents of the specified file are sent to the remote user before authentication is allowed.

5) If the "banner" parameter is set to "no", then no banner is displayed when using the ssh command or client.

6) By default, no banner is displayed and this setting is disabled.

πŸ¦‘You can also post a legal notice if required by local law.

see also:

1) How to set your banner in Metasploit

How to display banner / message before OpenSSH authentication
Log into the remote Linux and Unix server.
Edit the file / etc / ssh / sshd_config.
Add / change configuration parameter. For example: Banner / etc / ssh / my_banner
Save and close the file.

2) Make sure you create a new file called / etc / ssh / my_banner file.
Restart the sshd service. For instance:
# Linux #
sudo systemctl reload ssh.service
# FreeBSD #
sudo /etc/rc.d/sshd restart
# OpenBSD #
doas /etc/rc.d/sshd restart

3) Example banner / message file for sshd
Here is my file:
$ cat /etc/ssh/my_banner
Output:

. _____
| | / | _ ______ ____ _____ / ____ \ ___________
| \
\ / ___ // \ _ / ___ \ \ / _ \ _ \ | \
| || | \ ___ \\ ___ / \ \ ___ | | (<_>) | \ / | /
|
|| | / ____> \ ___> \ ___> | \ ____ / | __ | | ____ /
\ / \ / \ /
Testing
Let's test our SSH client.
4) It is a program for logging into a remote computer and for executing commands on that system.
As you know, ssh server and client provide secure encrypted communication between two untrusted hosts on an insecure network like LAN or Internet.

5) Use your favorite search engine and enter:
ASCII art

6) Another option is to use the figlet command to display large characters composed of normal screen characters.

7)We also have a toilet command that prints out text using large characters composed of smaller characters.
It is similar to a FIGlet with additional features such as Unicode handling, color fonts, filters, and various export formats.

πŸ¦‘For instance:
$ figlet nixCraft
$ toilet -f mono12 -F metal itsecforu
# figlet itsecforu > /etc/ssh/my_banner

@UndercodeTesting
@UndercodeHacking
@UndercodeSecurity
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘πŸ§ Parsing the / etc / shadow file :L

The / etc / shadow file stores the actual password in an encrypted format (more like a password hash) for the user account with additional properties related to the user's password.

Basically, it stores secure user account information.

All fields are separated by colons (:).

It contains one entry per line for each user specified in the / etc / passwd file.

πŸ„»πŸ„΄πŸ…ƒ'πŸ…‚ πŸ…‚πŸ…ƒπŸ„°πŸ…πŸ…ƒ :

1) Username: This is your login name.

2) Password: This is your encrypted password. The password must be at least 8-12 characters long, including special characters, numbers, lowercase letters, etc.

Usually the password format is $ id $ salt $ hashed. $ Id is an algorithm used in GNU / Linux as follows:

$1$ this is MD5
$2a$ this is Blowfish
$2y$ this is Blowfish
$5$ it's SHA-256
$6$ this is SHA-512

3) Last change of password (last change): days since January 1, 1970, when the password was last changed.

4) Minimum: The minimum number of days required to change the password, that is, the number of days remaining before the user is allowed to change their password.

5) Maximum: The maximum number of days the password is valid (after this user is forced to change his password)

6)) Warning: The number of days before the password expires that the user is warned to change the password.

7) Inactivity: the number of days after the password expires that the account has been disabled.

8) Expiration Date: Days from January 1, 1970, when this account is disabled, that is, an absolute date indicating when the login can no longer be used.

πŸ¦‘How do I change my password?
Use the following syntax to change your own password:

$ passwd

See the passwd command man page for more information.
How can I change the password for another user?
You must be root to change the password for other users:
# passwd userNameHere
or
$ sudo passwd userNameHere
How do I change or set password expiration information?
Use the chage command on Linux to change the password expiration information for a user.
The syntax is as follows (again, you must be root to set the password again):
chage username
chage [options] username
chage itsecforu
chage -l tom


@UndercodeTesting
@UndercodeHacking
@UndercodeSecurity
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁