Questions tagged [java]

Security aspects specific to the Java programming language, libraries, and virtual machine.

Filter by
Sorted by
Tagged with
1
vote
2answers
48 views

Semicolon's relation with reverse proxy

What is the relation of semicolon with reverse proxy and how is it able to escape context/servlet mapping in reverse proxies such as IIS, NGINX, Apache? Like I've seen multiple times where people have ...
1
vote
1answer
87 views

Can I get AES CBC key from known plaintext, ciphertext, iv? [duplicate]

Long story short: I was using AES CBC PKCS5 on my image server, but I lost my keys (one key per image). I know the first 61 bytes (the original and the encrypted) of each image plus I know the IV, and ...
0
votes
0answers
31 views

After signing a certificate using root CA, do we need to recreate ORB [migrated]

I have generated a self-signed root CA. Using this root CA, I generated new certificates and activated them on different entities. After this, I re-created JacORB. Later, I changed the certificate on ...
0
votes
0answers
18 views

what do these assembly code doing? [migrated]

I tried to reverse engineer an apk app, and it was loading a native code. I have observed that the app was using the native code like this public static String v = sUQWWyTBEs().toString().substring(32,...
0
votes
0answers
38 views

What is this (potentially malicious) Java code trying to do? [migrated]

Over on Reddit, a user claimed they'd found 'a potential bug in Java', and provided the following code: import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; public class ...
1
vote
1answer
35 views

Dyanamic class load for server side application

Is there a problem to use reflection (specifically class.forName) in server side application? My main thread about this is someone to inject a code dumping memory in JVM and adding commands in ...
0
votes
1answer
89 views

Deobfucate java code by running it

Can I deobfuscate java code (apk, that contains obfuscated code, or java bytecode), when running it? If android gets able to run code, so he must get those keys, and get access to code which to run. ...
1
vote
0answers
61 views

How to extract Wireshark keylog from a Java JSSE TLSv1.3 Session

Is it possible to extract the Wireshark keylog information directly from the TLSv1.3 handshake in a Java app? If so, how do I map the fields, or is additional material not shared in the handshake ...
1
vote
0answers
49 views

How to install Java 8 on Kali Nethunter [closed]

Guys I need to install jdk 8 for my programs to work better, many programs do not support the version higher than Java 8 so I want to install Java 8 to run better, I tried to install via apt-get, but ...
1
vote
1answer
84 views

Blind SQL Injection POC in Java

I am looking for some java applications (other than Manage Engine) vulnerable to Blind SQL Injection attacks for Authentication Bypass. I explored exploitdb and others but didn't find anything ...
1
vote
0answers
38 views

How to pentest a java application run through webswing?

I need to pentest a Java application through webswing. webswing allows running a java application in a web browser but how to pentest this? I didn't find any documentation about this actually. With my ...
0
votes
1answer
147 views

How to remove a ca certificate in debian?

I have added a root ca in my debian machine by using the following commands: mkdir /usr/local/share/ca-certificates/custom/ mv myserver.crt /usr/local/share/ca-certificates/custom/ update-ca-...
2
votes
0answers
72 views

Why do security-sensitive APIs prefer char[] over String when handling pass-phrases even in Java? What threat are they protecting against?

Although What is the best way to store password in memory (RAM) in Java? covers the same territory, this question has the aspect of noticing what other people do and wondering why. The question on SO:...
1
vote
1answer
65 views

Short digital signature

I want to digitally sign messages with strict size limitations. I am looking for digital signature algorithm providing very short signatures. (as short as possible) Which secure algorithms can I ...
0
votes
0answers
101 views

ysoserial java.rmi.NoSuchObjectException

I am trying to understand java deserialization exploits, and am attempting to use ysoserial to exploit a java RMI instance. In the examples section of the ysoserial git repo, the following command is ...
2
votes
1answer
168 views

Ways to reduce supply chain risks for java apps

What are the best practices for supply chain risks reduction for java applications? In my opinion java dependency management has the following downsides: Java applications use 3rd party dependencies ...
2
votes
0answers
45 views

Zip Slip path traversal and consistent vulnerability checks

According to multiple sources such as snyk and infoq, preventing a "Zip Slip" vulnerability in Java can be achieved by denying writes outside the target directory: String ...
5
votes
1answer
224 views

Web Assembly Security

I'm excited about the prospects of web-assembly for the future, but I'm curious if this will have the same security ramifications of Java Applets. What are some of the reasons why web assembly is ...
1
vote
2answers
156 views

Can a .jar file execute malware on macOS without running it?

I've heard java files can pose a significant security risk due to vulnerabilities. Is it possible for these java files to infect a computer with malware if they are never run? In my case, I am ...
0
votes
0answers
38 views

Android: what attack vectors are introduced by calling native code from the web (JS)?

I work on a large e-commerce project, the app in question is written in Kotlin (legacy code in Java). Recently we got the following question from the web team which instantly triggered my alarm bells: ...
1
vote
0answers
118 views

Wrapped Key Encryption - Hide AES secret key in Javascript & Java

I need to encrypt some sensitive fields back and forth in browser and server, same goes for decryption, for this I am planning to implement AES algorithm, but the problem here is with secret key which ...
1
vote
1answer
76 views

API Returning Java Exception. Safe?

I just wanted to ask if my concerns here are valid. I am aware that it is unsafe for the API to return a stack trace. I have a similar, but less egregious, situation that I am trying to judge. Is ...
2
votes
0answers
42 views

Java - Ultra Light Client (ULC traffic inspection)

I'm working on security assessment of thick client application created using ULC. It is black box approach. Based on wiki (wiki.c2.com): "Ultra Light Client (ULC) for Java is a widget set that ...
14
votes
7answers
3k views

Timing attacks in password hash comparisons

I had a discussion with a friend today about his password hash comparison. I argued that you can't return false on the first hash mismatch you have and I sent him a link to an article about a Java ...
0
votes
0answers
63 views

AES_GCM ciphers are not disabling using SHA256 or SHA384

I am trying to disable ciphers using jdk.tls.disabledAlgorithms. I have created a properties file named disabledAlgorithms.properties and it is has jdk.tls.disabledAlgorithms=AES_128_CBC,SHA1,SHA256. ...
4
votes
2answers
175 views

Is Java's probablePrime used in production?

Prime numbers are core in security. I saw this question about Java's probablePrime and was wondering if that API/approach is indeed used for real production-ready security code or other approaches are ...
0
votes
1answer
55 views

Establishing safe connection in Java

In my Java project I'm trying to create a 100% secure method of communication between the method and the client. I used to use this process: Client: generates 4096-bit RSA keypair Client: sends public ...
1
vote
1answer
53 views

How to protect certificates and keys in peer to peer application

I'm making a peer-to-peer cross-platform application (in Java & Kotlin), and I want to encrypt conversations between tens of users, concurrently. However, due to lack of knowledge in security good ...
3
votes
3answers
125 views

Applicability of CVE-2018-14721

My project uses different versions of jackson library at a number of places, and a security scanner flagged that the binary is vulnerable to CVE-2018-14721. My reading of https://nvd.nist.gov/vuln/...
0
votes
2answers
1k views

Do we need to disable the SSL verification while developing a web scrapping application in Java?

I am writing a web scrapping application using core Java. However when the application tried to access some https enabled URLs I am getting error. Below are the details. Code: url = new URL(...
0
votes
1answer
411 views

PostgreSQL injection with basic sanitization

I'm trying to figure out if an SQLi for the following PostgreSQL/Java code exists. public void availableItems(String name) { return this.query("SELECT * FROM items WHERE name='"+name+"...
1
vote
2answers
161 views

Hardware components based on which to generate password

I want to generate a password for a Keystore in java on Windows platform. I would like to make a HASH out of some hardware information from my computer and some salt. My question is: which hardware or ...
3
votes
0answers
171 views

How to set Secure attribute to csfcfc cookie in Glassfish?

After a vulnerabilities scan, I found that the csfcfc cookie does not have the Secure attribute. JSESSIONID has httpOnly and Secure attributes. Is there a way to force it? I found an answer for JBoss ...
1
vote
1answer
385 views

How to prevent from DNS spoofing in Java code which obtains a name of localhost

FORTIFY static scan has detected that this piece of our java code is vulnerable to DNS spoofing attack: public String getLocalhostName(){ try { return Inet4Address.getLocalHost()....
1
vote
1answer
49 views

Is this url verification with startsWith secure?

I would like to know if this code is secure to validate that a url is from my domain before loading it a webview in android : if (!url.startsWith("https://www.example.com/test/")){ // don't load ...
0
votes
1answer
255 views

AES encryption (in Java) of different JSON strings always produce same encrypted string as result. Why? [closed]

I have a program written in Java which takes JSON string as argument, encrypts it using AES then encodes it using Base64. JSON string is like: {"a": "b"} or {"a": "n"} or {"a": "k"} I.e related ...
1
vote
2answers
2k views

How do I know/find out about Minecraft Server Vulnerabilities?

I remember playing Minecraft (Java-we're only talking about Minecraft Java on the computer here) at like 13-14 years old, and having this server owner claim that the server has been hacked, and that ...
1
vote
0answers
70 views

Possibility of dynamically generated prepared statements and stored procedure SQL injection?

I am working on Java application which generate SQL prepared statements and stored procedure query strings using user inputs and executes with PreparedStatement.execute() or CallableStatement.execute()...
0
votes
2answers
399 views

First step into pentesting Vaadin web application framework

I have been given a project to perform penetration testing on a Vaadin Web Application. This kind of web application is new for me, so I'm just wondering what should I prepare to perform penetration ...
1
vote
1answer
219 views

Java KeyStore vs OpenSSL implementations of pkcs12 files -They seem to differ. Do they?

I generated a pkcs12 keystore in Java and wanted to inspect it with OpenSSL, but OpenSSL threw back an error. After a bit of head scratching I realized that the KeyStore format in Java allows you to ...
1
vote
1answer
2k views

What measures can be taken to prevent Server Side Request Forgery (SSRF) in a JAX-RS Application running on Apache Tomcat?

If I have a an application server that uses an implementation of JAX-RS, and is running as *.war file on an Apache Tomcat server, is there anything special that needs to be done or configured to ...
0
votes
0answers
140 views

Vulnerable Apache Tomcat server

I am a bug bounty hunter. When doing some research, I found a subdomain that is using Apache Tomcat. Talk about Tomcat, there was a vulnerability found in 2017: CVE-2017-12617. Any Apache Tomcat ...
0
votes
2answers
95 views

Can demo exploits/attacks be run on desktop applications? [closed]

Are there any applications/tools for exploiting desktop applications? (with pre-built exploits) I'd like to test my Java desktop app for security. I've looked at tools like Metasploit, but they seem ...
1
vote
1answer
82 views

Overview of Java Server Security Issues

My goal is to understand, which security issues will arise, when I use old java 8 versions on my server applications. There are lots of java security issues, but most are only relevant for client ...
3
votes
1answer
928 views

Safe usage of Runtime.getRuntime.exec(String[])

I was reviewing code of an application that uses the following piece of Java code and wanted to know if the the use of exec() was susceptible to command injection. public class FindFileInDir { ...
0
votes
1answer
265 views

How can I create a secure auto-login? (java)

I am writing a server-client program. When a new user installs the program and opens it for the first time, he has to enter a password. The password in combination with an email address is needed to ...
0
votes
1answer
93 views

Is RSA usage in combination with Java Socket secure?

I want to create a java program for server client communication. Therefore first the client creates a RSA keypair. Then the client sends the public key to the server. After that the server will create ...
0
votes
0answers
162 views

Securely encrypt and decrypt files via PBE in Java (Jasypt seems insecure)

This post has been MOVED to StackOverflow due to lack of answers on Info Security: https://stackoverflow.com/questions/60960802/securely-encrypt-and-decrypt-files-via-pbe-in-java-jasypt-seems-...
1
vote
2answers
364 views

How to store ECDSA public key securely in Android

I am writing an Android application that needs to verify that a request is sent from a trusted party (me). This is my current solution: Storing keys: Generate ECDSA public key / private key from a ...
1
vote
0answers
69 views

Would my Java web application be vulnerable if I use a netty version that is vulnerable to CVE-2019-20444 and CVE-2019-20445?

These has been fixed in later versions of Netty ... but what is the risk of using an older (can't upgrade now) version that is vulnerable to to CVE-2019-20444 and CVE-2019-20445 ... is there really a ...

1
2 3 4 5
14