security aspects specific to the Java programming language and libraries.

learn more… | top users | synonyms

3
votes
1answer
95 views

secure way to store application settings

What is a proper or, if possible to tell, the best way to store configuration in matters of security? So far I can tell that a database with very restricted access is a good way, but please lets ...
-1
votes
0answers
9 views

Java Keystore best practice for large scale application [on hold]

I'm new to JCE/cryptography in general but I'm working on demo where we are going to create a public/private key combination for each users of the site. All the examples I have seen so far stores ...
1
vote
1answer
58 views

Reflected file download Scenario

I'm making a Java-based web application that is intentionally vulnerable to Reflected File Download (RDF). White paper is here I read the requirements of reflected file download vulnerability as ...
0
votes
1answer
39 views

CSRF Guard - Can it protect service call also?

I'm implementing CSRF guard in my web application. I have done all the required configuration and I can see token getting generated/injected into the request header. Let me tell you application's ...
5
votes
1answer
120 views

Is it more secure to overwrite the value char[] in a String

I am talking about the Java implementation. Is it more secure to use reflection in order to access the internal Field value of type char[] inside a java.lang.String instance and overwrite the ...
3
votes
1answer
78 views

Session fixation in Java

In the process of developing a vulnerable jsp/servlet based application I made an attempt to introduce the session fixation vulnerability. Referring to the documentation I came up with the following ...
0
votes
1answer
66 views

Java org.xmlpull.v1.XmlPullParser and XML External Entity (XXE) Processing Attacks

I'm evaluating the security of an Android application and the application is using the XmlPullParser included with Android. I'm having some difficulty getting any common attacks to work, but I want ...
0
votes
1answer
41 views

Creating secure PIN in Java

I need to create cryptographically secure PIN number in Java using secret id for each user. This simple approach comes to mind: int getPin(String secretUserIdStr) { String pepper = ...
0
votes
1answer
107 views

Java TLS1.0 POODLE

Does java implementation affected? https://www.imperialviolet.org/2014/12/08/poodleagain.html
5
votes
2answers
505 views

Are there any real life cases, where using final keyword in Java increases system security?

I've came across that question on StackOverflow: http://stackoverflow.com/questions/18755713/how-does-final-play-a-role-in-security The claim is made, that according to Wikipedia: A final class ...
2
votes
2answers
9k views

Best Approach for removing XSS Vulnerability

I have been developing a Webobjects application, and I found that my application is vulnerable to XSS through URL, but not when malicious input like <script>alert("hi")</script> is input ...
0
votes
0answers
29 views

Considerations for using in-memory file system in a Java web application?

I was reviewing some code for a Java based web application accessible by authenticated users. It used the file system to work with temporary files, some of which have sensitive data. The input is a ...
12
votes
6answers
3k views

Client side password hashing

Edit: Updated to put more emphasis on the goal - peace of mind for the user, and not beefing up the security. After reading through a few discussions here about client side hashing of passwords, I'm ...
1
vote
1answer
37 views

Is there a way to verify a signed XML in Java

.NET has this great way to sign and then verify the signature of an XML file. Is there a way in Java to verify an XML file that .NET has signed this way? thanks - dave
2
votes
1answer
642 views

Is keystore file(server.jks), my private key file?

My task is to convert .p7b to .pfx. It would be great, if you could provide me some pointers. Below are the steps I did to generate .p7b file. I generated jks(java keystore) file using below ...
0
votes
1answer
542 views

ShellShock vulnerability and Java Web Applications

I am running a java webapplication ( Spring 3.2 based) on linux hosts. The linux hosts are vulnerable to the ShellShock vulnerability. Can someone exploit this vulnerabiity on my website ?
1
vote
1answer
52 views

What could happen if regex metacharacters using named capturing group are not encoded?

Let's say that a web application take a specific input from the user (e.g., search form), apply a Java regex with named caputring groups on it and use the final output to do other stuff (e.g., look ...
1
vote
0answers
95 views

Understanding Java Security Providers

I'm hoping to use the below issue we came across recently to better understand Java's security providers, ciphers and encryption in general. We got the following error during an SSL Handshake (using ...
4
votes
1answer
136 views

What is the best way to store password in memory (RAM) in Java?

Imagine there is a login form in Java application. We need assign usename and password to variables. Moment after we can Hash or HMAC password and keep it just for authentication step (no caching). ...
3
votes
1answer
779 views

Salt usage for Spring security?

I use the Spring security for Java web applications and I have written an authentication provider which is working without salt and now I want to either add salt or alternatively use the built-in ...
1
vote
1answer
70 views

Storing encryption passphrases in memory in Dalvik?

Given KeePassDroid, I'm considering some of the security implications of accessing KeePass databases on an Android device. In the native applications for Windows, OSX, and Linux, whenever the ...
1
vote
1answer
51 views

Using cookies for cross domain authentication

I have an web app 1 which would do the authentication of the user. After that I want to forward the request to another web app 2. Now web app 1 will generate some hashcode which I can authenticate in ...
0
votes
1answer
78 views

How come PBEWITHSHA256AND128BITAES-CBC-BC violates the 128bit key limit?

In my Java application (which use StandardPBEStringEncryptor by jasypt), when i use the PBEWITHSHA256AND128BITAES-CBC-BC algorithm instead of something weaker such as PBEWithMD5AndDES, i get an ...
2
votes
1answer
57 views

Is return oriented programming applicable to pure Java code?

I'm interested in ROP in the context of Java. For now, I don't consider the native code of the Java virtual machine. Is return oriented programming applicable to pure Java code?
0
votes
2answers
76 views

What's the best way to authenticate an user using a websocket?

I'm creating a multiplayer game(based in websockets) which runs directly from the browser and which has multiplayer functionality. Each player needs to have his own account(Username and password). ...
2
votes
1answer
234 views

Are Java applications vulnerable to CVE-2014-6321 (WinShock)?

CVE-2014-6321 (also known as MS14-066) is a heap overflow vulnerability discovered by Microsoft engineers in Schannel, the SSL/TLS implementation used by Windows. My Java application uses SSL (JSSE ...
6
votes
2answers
548 views

Is TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 a safe cipher suite to use?

Is TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 a safe cipher suite to use for a TLS 1.2 connection to a Tomcat server? What are potential weaknesses or better alternatives? I am looking for a cipher ...
10
votes
3answers
2k views

Java SecureRandom doesn't block? How?

I know from experience that reading from /dev/random blocks when the Linux kernel entropy pool runs out of entropy. Also, I've seen many articles and blog entries stating that when running on Linux, ...
-4
votes
1answer
66 views

How to create a secure channel in Java?

I am creating a certification server which takes some required details like name, email etc from clients and issues public and private keys using RSA along with digital certificate. Initially all ...
0
votes
1answer
202 views

Auto deploy war file (backdoor/shell) to particular folder [closed]

I am in the midst of a pentest. I have managed to uploaded a war shell (backdoor) in c:\test\ which is automatically deployed in a folder, for example c:\test\tmpbrowser.war. The application which I ...
0
votes
1answer
104 views

Dump SSL traffic from a Java applet

I have a smartcard that can be read by websites using a Java applet (see http://www.springcard.com/online/applet_pcsc/). I would like to monitor and is to replay packets going from this java applet to ...
1
vote
1answer
41 views

On File delete, using java File delete method what could be the security issue?

In my case, the static code analysis tool shows the issue when it founds the code like this boolean status = file.delete(); It issues the security vulnerability saying the validation is ...
1
vote
1answer
123 views

Client Hello message suggests cipher suite which is not in the list specified by setEnabledCipherSuites() method

In my code, I use JSSE6 API to specify a list of enabled cipher suites. I aimed to only allow 168 bits or higher encryption cipher suites, below is a part of my code: /** List of 168 bits encryption ...
1
vote
1answer
118 views

Checklist for securing JBoss

Is there a security checklist for auditing JBoss configuration files ? CIS and DISA provides security checklist only for Tomcat and Apache server. Is there any other ressources ?
6
votes
1answer
396 views

Is java Client vulnerable by POODLE?

I have a Java based application (running on java 5 or higher) that establishes an SSL connection towards an Apache tomcat 7.0.47 on java 7. From what I understand, to exploit POODLE you need a client ...
-1
votes
1answer
62 views

Exchange of encrypted files through a server

I have a thing to do, that basically bases on a server that is honest but curious. Therefore I want the server to have the public key for encryption and it will encrypt files during the process of ...
0
votes
1answer
80 views

extracting JSESSIONID from document.cookie

I was trying cookie stealing on a java and spring based web application. Normally, a cookie can be obtained through <script>alert(document.cookie)</script>, but in the above code, cookie ...
77
votes
7answers
10k views

Why do I hear about so many Java insecurities? Are other languages more secure?

I really like the Java programming language, but I continuously hear about how insecure it is. Googling 'java insecure' or 'java vulnerabilities' brings up multiple articles talking about why you ...
0
votes
1answer
66 views

jRAT virus on Linux

I dumbly downloaded a .jar file that contained jRAT. When run, it stalls, gives a FileNotFoundException, then crashes. When I ls'd, the jar was there. When I cd'd out and back in, the jar was gone. ...
2
votes
1answer
118 views

How to autenticate properly in Java

I have to write some login module for Java EE application. Previously i was using JBoss security - provided login and password, called HttpServletRequest with login method and JBoss security did the ...
1
vote
3answers
77 views

Capture query to MySQL in Server

I want to capture queries to MySQL from my web-application on my Linux-based Server. MySQL port is 3306 and my web-application in on port 8181. So I started using tcpdump as follow: # tcpdump -x ...
0
votes
0answers
32 views

Authentication for Restful web services [duplicate]

I am building a restful web services. My requirement is that I have to provide authentication for accessing the webservices. First I tried with basic authentication. Which is working fine, but ...
1
vote
3answers
516 views

Java AES encryption output length

I am trying to encrypt few database columns (string values) using Java AES algorithm. This is to protect certain sensitive data. For some users these data should decrypted. In Java AES encryption, if ...
0
votes
2answers
173 views

Can we hide a constant hashed key used for AES encryption of a password?

Are there any methods in java to hide a constant hashed key which is embedded in a class? FYI, the key is used to AES encrypt a password used to authenticate a Web Service which would only take a ...
0
votes
1answer
433 views

What is the risk of installing Facebook Video Calling jar file?

I'm trying to talk with somebody on Facebook, but after many Facebook privacy scandals, it's a big question. Secondly on OSX, it's giving me the error that “FacebookVideoCalling_v1.6.jar” can’t be ...
2
votes
4answers
176 views

Vulnerability exploitation in Java

I am not intimately familiar with Java, so this could be a stupid question. In a C program I can find buffer overflows or may be a ROP based exploit to run custom code. How is it done in the context ...
1
vote
1answer
105 views

Is Java javax.servlet.http.HttpServletResponse sendRedirect() auto replace the carriage return(%0d%0a) to prevent Http Header Splitting attack?

I just tried to demonstrate a simple Web app program to simulate the Http Header Splitting attack but I failed. I realise that this sendRedirect() function has filtered my carriage return and replace ...
21
votes
4answers
82k views

How can I export my private key from a Java Keytool keystore?

I would like to export my private key from a Java Keytool keystore, so I can use it with openssl. How can I do that?
1
vote
1answer
49 views

Developer Security Training .NET / JAVA [closed]

Hello my team is tasked to perform security focused training for developers (.NET and JAVA). I have used WebGoat to demonstrate OWASP Top 10 type security vulnerabilities and am looking for a similar ...