Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
uk.gov.dwp.crypto:secure-strings
Advanced tools
Utility for storing passwords in memory encrypted form to prevent heap inspection
This project is to make it easy to store passwords in an encrypted form using a cipher that is constructed inside the application and is different for every instance.
This was created to mitigate the Heap_Inspection vulnerability:-
String variables are immutable - in other words, once a string variable is assigned, its value cannot be changed or removed. Thus, these strings may remain around in memory, possibly in multiple locations, for an indefinite period of time until the garbage collector happens to remove it. Sensitive data, such as passwords, will remain exposed in memory as plaintext with no control over their lifetime.
properties entry in pom
<properties>
<dwp.securestrings.version>x.x</dwp.securestrings.version>
</properties>
dependency reference
<dependency>
<groupId>uk.gov.dwp.crypto</groupId>
<artifactId>secure-strings</artifactId>
<version>${dwp.securestrings.version}</version>
</dependency>
import uk.gov.dwp.crypto.SecureStrings;
import javax.crypto.SealedObject;
Standard implementation
public class Pojo {
private SecureStrings secureStrings = new SecureStrings();
private SealedObject password = null;
public String getPassword() {
return secureStrings.revealString(password);
}
public void setPassword(String password) {
this.password = secureStrings.sealString(password);
}
}
Injected class
public class Pojo {
private SecureStrings secureStrings = null;
private SealedObject password = null;
@Inject
public Pojo(SecureStrings secureStrings) {
this.secureStrings = secureStrings;
}
public String getPassword() {
return secureStrings.revealString(password);
}
public void setPassword(String password) {
this.password = secureStrings.sealString(password);
}
}
FAQs
Utility for storing passwords in memory encrypted form to prevent heap inspection
We found that uk.gov.dwp.crypto:secure-strings demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.