Skip to content
KitploitKITPLOIT
StrumentiExploitsBlog
Log in
Invia
StrumentiExploitsBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

FeedContattoPrivacy© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
spring-RCE-CVE-2022-22965 — Analisi didattica e proof-of-concept exploit per CVE-2022-22965, una vulnerabilità di esecuzione remota di codice in Spring MVC/WebFlux tramite data binding su JDK 9+ con distribuzione WAR su Tomcat. | Kitploit
Strumenti/GitHubGitHub/enokiy/spring-rce-cve-2022-22965
Analisi delle VulnerabilitàAnalisi del CodiceExploitSfruttamento di Applicazioni WebApprendimento e Formazione
GitHubenokiy/spring-rce-cve-2022-22965

spring-RCE-CVE-2022-22965

Analisi didattica e proof-of-concept exploit per CVE-2022-22965, una vulnerabilità di esecuzione remota di codice in Spring MVC/WebFlux tramite data binding su JDK 9+ con distribuzione WAR su Tomcat.

Vedi Repository
194 anni faNon ancora revisionato

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

Panoramica della vulnerabilità

Recentemente, Spring ha rilasciato una vulnerabilità CVE di alto livello. Le informazioni sulla CVE indicano: "Un'applicazione Spring MVC o Spring WebFlux in esecuzione su JDK 9+ può essere vulnerabile a esecuzione di codice remoto (RCE) tramite data binding. Lo sfruttamento specifico richiede che l'applicazione venga eseguita su Tomcat come distribuzione WAR. Se l'applicazione viene distribuita come eseguibile JAR di Spring Boot, cioè il default, non è vulnerabile allo sfruttamento. Tuttavia, la natura della vulnerabilità è più generale e potrebbero esserci altri modi per sfruttarla." Questa analisi apprende il principio della vulnerabilità riproducendo la CVE.

API Java Bean

Prima di esaminare il principio di binding dei parametri di Spring MVC, diamo un'occhiata ad alcune API relative ai Java Bean.

  • Java Bean: in realtà è una specifica. Quando una classe soddisfa questa specifica, può essere richiamata da altre classi specifiche. Quando una classe viene utilizzata come Java Bean, contiene un insieme di proprietà private, e le operazioni di lettura/scrittura su queste proprietà vengono eseguite tramite i metodi pubblici get/is<XXXX>() o set<XXXX>(<PropertyType>).
  • Introspector: La classe Introspector fornisce un modo standard per gli strumenti di apprendere le proprietà, gli eventi e i metodi supportati da un Java Bean di destinazione. Per ciascuno di questi tre tipi di informazioni, l'Introspector analizzerà separatamente la classe del bean e le sue superclassi cercando informazioni esplicite o implicite e utilizzerà tali informazioni per costruire un oggetto BeanInfo che descriva in modo completo il bean di destinazione. (Il modo predefinito fornito da Java per le proprietà, gli eventi e i metodi di una classe Java Bean. Ad esempio, quando si cerca una proprietà/metodo di una classe bean, se non viene trovata nella classe bean corrente, si cerca nella classe padre del bean, ecc.)
  • BeanInfo: Introspect su un Java Bean e apprendere tutte le sue proprietà, metodi esposti ed eventi. Se la classe BeanInfo per un Java Bean è stata già introspettata in precedenza, la classe BeanInfo viene recuperata dalla cache BeanInfo.
  • PropertyDescriptor: Utilizzato per descrivere le proprietà esposte da un Java Bean tramite un insieme di metodi di accesso.

Dichiarazione di una classe Java Bean come segue:```java public class User { private String name;

public User() {
}
public void setName(String name) {
    this.name = name;
}
public String getName() {
    return this.name;
}
public int getAge() {
    return 18;
}

}

Usa il seguente codice di test per vedere le informazioni ottenute da Introspector.getBeanInfo:```java
@Test
    public  void testIntrospector() throws IntrospectionException {
        BeanInfo beanInfo = Introspector.getBeanInfo(User.class);
        for (PropertyDescriptor pdesc:beanInfo.getPropertyDescriptors()){
            System.out.println("Property: " + pdesc.getName() + ",Class:" + pdesc.getPropertyType());
        }
//        for (MethodDescriptor md:beanInfo.getMethodDescriptors()) {
//            System.out.println("Method: " + md.getName());
//        }
    }

[No content provided to translate.]```text Property: age,Class:int Property: class,Class:class java.lang.Class Property: name,Class:class java.lang.String

Oltre a 'age' e quello previsti, c'è anche un attributo 'class', il nome della classe è Class, e se si continua a chiamare Introspector.getBeanInfo(Class.class) si possono ottenere ulteriori informazioni come classLoader, ecc.:```text jdk11:
Property: annotatedInterfaces
Property: annotatedSuperclass
Property: annotation
Property: annotations
Property: anonymousClass
Property: array
Property: canonicalName
Property: class
Property: classLoader
Property: classes
Property: componentType
Property: constructors
Property: declaredAnnotations
Property: declaredClasses
Property: declaredConstructors
Property: declaredFields
Property: declaredMethods
Property: declaringClass
Property: enclosingClass
Property: enclosingConstructor
Property: enclosingMethod
Property: enum
Property: enumConstants
Property: fields
Property: genericInterfaces
Property: genericSuperclass
Property: interface
Property: interfaces
Property: localClass
Property: memberClass
Property: methods
Property: modifiers
Property: module
Property: name
Property: nestHost
Property: nestMembers
Property: package
Property: packageName
Property: primitive
Property: protectionDomain
Property: signers
Property: simpleName
Property: superclass
Property: synthetic
Property: typeName
Property: typeParameters

Inoltre, confrontiamo le differenze delle informazioni ottenute da Introspector.getBeanInfo(Class.class) in diverse versioni di JDK: sopra c'è l'output di jdk-11, sotto quello di JDK8:```text jdk8: Property: annotatedInterfaces Property: annotatedSuperclass Property: annotation Property: annotations Property: anonymousClass Property: array Property: canonicalName Property: class Property: classLoader Property: classes Property: componentType Property: constructors Property: declaredAnnotations Property: declaredClasses Property: declaredConstructors Property: declaredFields Property: declaredMethods Property: declaringClass Property: enclosingClass Property: enclosingConstructor Property: enclosingMethod Property: enum Property: enumConstants Property: fields Property: genericInterfaces Property: genericSuperclass Property: interface Property: interfaces Property: localClass Property: memberClass Property: methods Property: modifiers Property: name Property: package Property: primitive Property: protectionDomain Property: signers Property: simpleName Property: superclass Property: synthetic Property: typeName Property: typeParameters

" wait, the user's message shows:

INPUT:


It appears there is only a newline and then a carriage return (
). That might be empty content. The rules say translate only natural language text, and preserve all markdown. If the input is empty, then output should be empty as well.

But let me double-check the user's message. After "INPUT:" there is a line with just a backtick? Actually the formatting is:

INPUT:


That is a backtick block. Inside: a blank line, then a carriage return character. So likely the chunk is empty or just a newline. Since we must preserve structure exactly, we output exactly the same: a blank line and then a newline? But the instruction says "Return ONLY the translated text. No preamble...". So I will output exactly the same as input: a blank line and then the carriage return? However in textual response, a carriage return is not typical. The input includes a literal carriage return character (
). In plain text, we can preserve that as is? But that might cause issues. Better to output exactly the same characters. Since the input is empty line followed by carriage return, the output should be the same.
Scarica lo strumento