Java War Package and decompression commands

Source: Internet
Author: User

When it comes to JBoss unreasonable configuration, you can access jmx-console without authorization, so you can deploy the malicious war file, get the Webshell of the JBoss server, and further penetrate the server privileges and even the intranet roaming.

There is a lot of relevant information on the network for the attack idea of improper deployment of JBoss. You can refer to Links: http://drops.wooyun.org/papers/178 and http://www.hack80.com/thread-22662-1-1.html. When it comes to deploying a war package, there are some operations in eclipse, which can also be done under the command line. Now that you're deploying Webshell, use the simplest command-line operation.

In fact, this online also has a lot of information. I just collect it and make a note for you to see it later. The war file that is ready to be deployed needs to contain the *.jsp file and a Web-inf folder, where the Web-inf folder contains a file that has a Web. Xml. The format can be referenced as follows:

<? ?>
< Web-appxmlns="Http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="Http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemalocation="Http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
< servlet >
< servlet-name>jspspy Shell</servlet-name>
< JSP-file>/jspspy.jsp</jsp-file>
</ servlet >
</ Web-app>

At the command line, enter the directory that you want to package, as shown in:

Next, execute the JAR command in the form:

Jar CVF Package file name to package the directory package file save path

As shown in the following:

The decompression command is naturally:

Jar XVF Cmd.war

As shown in the following:

All right, that's it. This is easier than packing under eclipse.

Java War Package and decompression commands

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.