Linux Power Summary
0x01 Exploding from kernel
Take advantage of known loopholes, such as dirty cattle.
0x02 Password drawings
First of all, we need to introduce two documents. /etc/passwd and /etc/shadow
1. /etc/passwd
Passwd files store user-specific information, readable for all users and writeable for root
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
Split by colon, first column is user name (daemon); the second column is password and x indicates password Hash in a shadow file; the third column is UID, fourth column is GID, fifth column is user full name or local account number; the sixth column is home directory; the seventh column is end command passwd files used after login are writeable; if X is replaced with our own Hash, the target root password can be changed.
2. /etc/shadow
The shadow file is readable only by root and can be removed from the value of this file hashcat、johnBlast.
root:$6$JNHsN5GY.jc9CiTg$MjYL9NyNc4GcYS2zNO6PzQNHY2BE/YODBUuqsrpIlpS9LK3xQ6coZs6lonzURBJUDjCRegMHSF5JwCMG1az8k.:18134:0:99999:7:::
Also divided by semicolon, the first column is user name (root), the second column is encrypted password ($6.JNHsN5GY.jc9CiTg$MjYL9NyNc4GcYS2zNHY6PZ2BE/YODBUQrsrpIpS9LK3xcoZ6lonzURBJUDJCRegMHSF5JwCMG1az8k.) The third column is the date of recent change in password (18134) The fourth column is the number of days that cannot be changed: setting this value means that no further changes can be made to the password from the date of change of password, and if it is 0, the fifth column is not restricted is the number of days for which re-changed password: if it is 999999, the sixth column indicates an early warning day for expiry of password (7) The seventh column is the time for forgiveness of passwords (7) The eighth column is the period for expiration of account numbers.
0x03 password reuse
Like databases, backstage Web passwords. Probably root code.
0x04 sudo abuse
Sudo is the usual power-driven command that can be used to enhance privileges when enforcement powers are not sufficient. The configuration file is /etc/sudoers, this document records the users who can execute sudo, whether defined applications are root accessible and whether password authentication is required.
sudo -lThis command allows you to see which orders are enforceable, i.e. without knowing the user password, just checking your permission password.
![]()
As shown in the chart above, you can upgrade to root privileges with a cat command.

0x05 Time job
Availablepspy64See what happens to the backstage of the system.

According to this UID 1183, union/etc/passwd You can find the user (vanshal) who executes this script, and then write a rebound shell in this script.sh in Backup.sh.

Listening at kali.

Winshal is successful.
0x06 SUID
References:Linux Powered — Using Executable SUID
SUID is a special file attribute that allows users to run as owners of the file and search for SUID files
find / -user root -perm -4000 -print 2>/dev/null find / -perm -u=s -type f 2>/dev/null
find / -user root -perm -4000 -exec ls -ldb {} ;
For example, we found one in the chart below. /scripts/find File has s properties

Use it.ls -l /scripts/find View Find

You can see this belongs to Nightfall.

Use Suid execution to obtain the identity of the file owner ‘ s permissions and access to nightfall
/scripts/find . -exec "/bin/sh" -p \;
-exec: Instructions to put the Find behind execute /bin/sh: Execute sh-p: Execute sh\ with owner privileges of the document;: Convert by semicolon

Got Nightfall access.
未经允许不得转载:萌萌Apprentissage » Linux Power Root Summary
linux One Chinese script
Google shell enable enhanced mode 4 nuclear 16G RAM
Tmux use tutorial
Screen's summary
I'm gonna get you a new one, shell.cloud.google on the line.
Linux Memory Clearing