By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
Security Parrot - Cyber Security News, Insights and ReviewsSecurity Parrot - Cyber Security News, Insights and Reviews
Notification
Latest News
OpenAI may use Associated Press archive for AI training
July 14, 2023
EU users can hold conversations with Google Bard from training set
July 14, 2023
Aptos, the new default font for Microsoft Office
July 14, 2023
BlackLotus UEFI bootkit sources published on GitHub
July 14, 2023
Hackers from the XDSpy cyber-espionage group attacked Russian organizations on behalf of the Ministry of Emergency Situations
July 14, 2023
Aa
  • News
  • Tutorials
  • Security InsiderComing Soon
  • Expert InsightComing Soon
Reading: Bypassing the guard. How applications protected by a Sentinel hardware key are opened
Share
Security Parrot - Cyber Security News, Insights and ReviewsSecurity Parrot - Cyber Security News, Insights and Reviews
Aa
Search
  • News
  • Tutorials
  • Security InsiderComing Soon
  • Expert InsightComing Soon
Follow US
Security Parrot - Cyber Security News, Insights and Reviews > News > Bypassing the guard. How applications protected by a Sentinel hardware key are opened
News

Bypassing the guard. How applications protected by a Sentinel hardware key are opened

Last updated: 2023/06/09 at 9:40 AM
Security Parrot Editorial Team Published June 9, 2023
Share
SHARE

Bypassing Sentinel Hardware Key Protection for Java Applications

Reverse engineering applications written in Java is usually not difficult, unless the developers have taken steps to protect their code. To make life difficult for hackers and researchers, various tools are used, one of which is protection with a Sentinel hardware key. In this article, we will look at a way to bypass such protection.

Weak Point of Protection

Those who have read previous articles on protecting Java applications know the weakest point of such protection: the transparency of the bytecode and the ease of restoring it to source code. Therefore, the developers of such tools strive to hide the code from the prying eyes of hackers as cunningly as possible, using various techniques: obfuscation, compilation to native, encryption. We began to analyze a clear example of the latter in the article “Defenseless Java. Breaking Java bytecode encryption. Then we settled on inline patching of the decoded bytecode directly from the JVMTI agent library.

Bypassing Sentinel Hardware Key Protection

Today we will continue this topic and learn how to patch the encrypted code directly. As an example, we will take an application protected by the Sentinel Licensing API Java Class Library, a special Java class protection library that comes with Hasp keys. The application itself is protected by the Hasp key, and hasp_rt files specific to Sentinel are present in its working directory. exe , hasp_windows_x64_34344. dll , haspvlib_34344. dll and Java-specific HASPJava. dll , HASPJava_x64. dll , sntljavaclsrt. dll , sntljavaclsrt_x64. dll.
We know from experience that it’s better not to even try to break these libraries “on the forehead”, they are very severely virtualized and protected from debugging and modification. Therefore, we look at the compiled classes contained inside the JAR . Everything is gloomy there too: except for the main class, all the rest are encrypted with high entropy.
The cryptor is not connected as a JavaAgent when the application is launched, but from the main class, which is essentially an application loader with the only open source:
public static void main ( String [ ] stringArray ) {
try {
String string ;
String string2 = System . getProperty("java.class.path");
int n = Math . max ( string2 . lastIndexOf ( "\ "), string2. lastIndexOf( " / ")) ;
String string3 = string = string2. substring( 0, ++n) ;
if ( JavaClsEntry. isWindows()) {
string3 = string3 + " sntljavaclsrt ";
if ( 0 == System. getProperty( " sun . arch . data . model "). compareTo( " 64 ")) {
string3 = string3 + " _x64 ";
}
string3 = string3 + ".dll";
} else if ( JavaClsEntry. isLinux()) {
string3 = string3 + " libsntljavaclsrt_x86_64 . so ";
} else {
return;
}
File file = new File(string3) ;
string3 = file. getAbsolutePath() ;
System. load(string3);
}

In the next article, we will look at how to patch the encrypted code directly. Stay tuned!

Weekly Updates For Our Loyal Readers!

Security Parrot Editorial Team June 9, 2023
Share this Article
Facebook Twitter Email Copy Link Print

Archives

  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • February 2023
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020

You Might Also Like

News

OpenAI may use Associated Press archive for AI training

July 14, 2023
News

EU users can hold conversations with Google Bard from training set

July 14, 2023
News

Aptos, the new default font for Microsoft Office

July 14, 2023
News

BlackLotus UEFI bootkit sources published on GitHub

July 14, 2023

© 2022 Parrot Media Network. All Rights Reserved.

  • Home
  • Parrot Media Group
  • Privacy Policy
  • Terms and Conditions
Join Us!

Subscribe to our newsletter and never miss our latest news, podcasts etc..

Zero spam, Unsubscribe at any time.

Removed from reading list

Undo
Go to mobile version
Welcome Back!

Sign in to your account

Lost your password?