Obufuskacja wartości liczbowych w Javie

Mój JObfuscator zyskał nową funkcjonalność, aby ochronić się przed wbudowanym deobfuscatorem w popularnym narzędziu do dekompilacji Javy – JEB.

https://www.pelock.com/pl/jobfuscator/

Wprowadzona zmiana do silnika w wersji v1.02:

  • Strategia obfuskacyjna polegajaca na przenoszeniu wartości liczbowych do tablic, zamiast zapisywanych tam wartości integer, zapisuje je jako typ double, aby zapobiec deobfuskacji przez popularne dekompilatory Javy np. double[] var_2597 = new double[]{13.898355719807563D, 65535.73657403742D, ... };.

A wyniki poniżej:

////////////////////////////////////////////////////////////////////////////////
//
// An output from JObfuscator v1.02 - Bartosz Wójcik
//
// Website   : https://www.pelock.com/products/jobfuscator
// Version   : v1.02
// Params    : /MixCodeFlow /RenMethods /RenVars /ShuffleMethods /CryptStr /IntsToArray
// New lines : Windows (CRLF - \r\n)
// Date      : 30.07.2021
//
////////////////////////////////////////////////////////////////////////////////

import java.util.*;
import java.lang.*;
import java.io.*;

class Ideone {

    public static void main(String[] args) {
        double[] jD4b___uBcBLnT4DPDc = { 7.604463844941735E8, 0.4824279911499976, 46681.74401412342, 6.34113063370141E8, 65535.63496958159, 5.852873783059233E8, 25.66917563526717, 1.2261583709266335E7, 1.8878934664606395E9 };
        int fIpmgdCymnfvihwPzvzzuq = (int) (jD4b___uBcBLnT4DPDc[1]);
        double g_tagCadjjq = 0;
        double[] g_pUotremgjarSxlrilxsp = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
        fIpmgdCymnfvihwPzvzzuq = (int) (jD4b___uBcBLnT4DPDc[8]);
        while (fIpmgdCymnfvihwPzvzzuq != (int) (jD4b___uBcBLnT4DPDc[0])) {
            switch(fIpmgdCymnfvihwPzvzzuq) {
                case 1382297864:
                    g_tagCadjjq = func_3903(g_pUotremgjarSxlrilxsp);
                    fIpmgdCymnfvihwPzvzzuq += (int) (jD4b___uBcBLnT4DPDc[7]);
                    break;
                case 1887893466:
                    double[] XGYUK_LACYDYTIW_EMMQXIKKLZ = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
                    fIpmgdCymnfvihwPzvzzuq ^= (int) (jD4b___uBcBLnT4DPDc[5]);
                    break;
                case 1394559447:
                    String PUWZTYOXS_HDNJMV_IERUS = "";
                    int[] FJUVLQWHW = { 0x49FA, 0x4A1B, 0x4A08, 0x4A15, 0x4A0B, 0x4A08, 0x4A19, 0x4A0B, 0x49C7, 0x49EB, 0x4A0C, 0x4A1D, 0x4A10, 0x4A08, 0x4A1B, 0x4A10, 0x4A16, 0x4A15, 0x49C7, 0x49E4, 0x49C7, 0x49CC, 0x49D5, 0x49DD, 0x4A0D };
                    for (int UVANKYPS = 0, MIKHXBMRDG_MUBVDJQGWP_EBPCHEYDCI = 0; UVANKYPS < (int) (jD4b___uBcBLnT4DPDc[6]); UVANKYPS++) {
                        MIKHXBMRDG_MUBVDJQGWP_EBPCHEYDCI = FJUVLQWHW[UVANKYPS];
                        MIKHXBMRDG_MUBVDJQGWP_EBPCHEYDCI += (int) (jD4b___uBcBLnT4DPDc[2]);
                        PUWZTYOXS_HDNJMV_IERUS += (char) (MIKHXBMRDG_MUBVDJQGWP_EBPCHEYDCI & (int) (jD4b___uBcBLnT4DPDc[4]));
                    }
                    System.out.format(PUWZTYOXS_HDNJMV_IERUS, g_tagCadjjq);
                    fIpmgdCymnfvihwPzvzzuq -= (int) (jD4b___uBcBLnT4DPDc[3]);
                    break;
            }
        }
    }

    public static double func_3903(double[] numArray) {
        double[] GSfEZBJsdhjRI___ = { 2.421334501204269, 4.2393759827450454E8, 0.06646005259426904, 2.9763455637251534E7, 1.1946054156556988E9, 1.4664297363385243E9, 1.7585613120558941E9, 9.148263841375413E8, 1.501540404215826E8 };
        int gnLj0_X9TMHrL_7Sg_K7 = (int) (GSfEZBJsdhjRI___[2]);
        double pPmqsyfrtFwamsgfysyWkekjdfl = 0;
        double var_921 = 0, BEFYYQAD = 0;
        int dIblmttjWoinogu = 0;
        gnLj0_X9TMHrL_7Sg_K7 = (int) (GSfEZBJsdhjRI___[7]);
        while (gnLj0_X9TMHrL_7Sg_K7 != 1466429736) {
            switch(gnLj0_X9TMHrL_7Sg_K7) {
                case 684346482:
                    for (double HGSQSTL_IVVSZST_YJJUENDDQE : numArray) {
                        BEFYYQAD += Math.pow(HGSQSTL_IVVSZST_YJJUENDDQE - pPmqsyfrtFwamsgfysyWkekjdfl, (int) (GSfEZBJsdhjRI___[0]));
                    }
                    gnLj0_X9TMHrL_7Sg_K7 ^= (int) (GSfEZBJsdhjRI___[1]);
                    break;
                case 1878951897:
                    pPmqsyfrtFwamsgfysyWkekjdfl = var_921 / dIblmttjWoinogu;
                    gnLj0_X9TMHrL_7Sg_K7 += -(int) (GSfEZBJsdhjRI___[4]);
                    break;
                case 1728797857:
                    for (double LDUUTP_VAPNT_LNFBFX : numArray) {
                        var_921 += LDUUTP_VAPNT_LNFBFX;
                    }
                    gnLj0_X9TMHrL_7Sg_K7 += (int) (GSfEZBJsdhjRI___[8]);
                    break;
                case 914826384:
                    BEFYYQAD = 0.0;
                    gnLj0_X9TMHrL_7Sg_K7 = (int) (GSfEZBJsdhjRI___[6]);
                    break;
                case 831425100:
                    gnLj0_X9TMHrL_7Sg_K7 = (int) (GSfEZBJsdhjRI___[5]);
                    break;
                case 1758561312:
                    dIblmttjWoinogu = numArray.length;
                    gnLj0_X9TMHrL_7Sg_K7 -= (int) (GSfEZBJsdhjRI___[3]);
                    break;
            }
        }
        return Math.sqrt(BEFYYQAD / dIblmttjWoinogu);
    }
}

Dodaj komentarz