Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@NullArray
Created February 12, 2019 23:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save NullArray/f39b026b9e0d19f1e17390a244d679ec to your computer and use it in GitHub Desktop.
Save NullArray/f39b026b9e0d19f1e17390a244d679ec to your computer and use it in GitHub Desktop.
RootHelper Obfuscated, Encrypted, Converted to C source
//#____ ____ __
//#\ \ / /____ _____/ |_ ___________
//# \ Y // __ \_/ ___\ __\/ _ \_ __ \
//# \ /\ ___/\ \___| | ( <_> ) | \/
//# \___/ \___ >\___ >__| \____/|__|
//# \/ \/
//#--Licensed under GNU GPL 3
//#----Authored by Vector/NullArray
//###############################################
static char data [] =
#define tst2_z 19
#define tst2 ((&data[0]))
"\263\277\321\066\003\154\275\324\046\056\177\332\022\176\215\267"
"\225\257\124\077\231\153\113"
#define msg2_z 19
#define msg2 ((&data[27]))
"\130\327\251\020\052\241\201\170\040\364\040\311\116\250\221\013"
"\042\117\014\036\324\006\052\006\014"
#define xecc_z 15
#define xecc ((&data[48]))
"\202\017\277\363\110\142\321\115\111\132\232\207\141\132\012"
#define chk2_z 19
#define chk2 ((&data[66]))
"\305\202\107\104\245\257\006\036\306\265\151\002\265\360\253\340"
"\314\126\171\311\205\036\015"
#define date_z 1
#define date ((&data[86]))
"\236"
#define tst1_z 22
#define tst1 ((&data[92]))
"\175\366\051\026\141\134\240\370\265\367\000\343\331\270\362\332"
"\327\001\317\311\064\346\354\120\252\350\004\165\275\075\345\026"
#define msg1_z 65
#define msg1 ((&data[128]))
"\033\234\176\107\307\146\010\011\053\357\047\120\066\304\207\177"
"\343\356\307\171\142\352\241\313\157\025\212\313\100\132\235\011"
"\115\175\220\261\013\042\026\154\144\331\310\377\006\225\203\307"
"\017\052\375\021\264\234\115\374\374\374\103\263\070\006\352\035"
"\044\001\275\015\323\363\260\323\333\230\213\120"
#define shll_z 10
#define shll ((&data[197]))
"\065\066\311\307\150\203\372\167\275\257\225\100\245"
#define inlo_z 3
#define inlo ((&data[208]))
"\274\035\355"
#define lsto_z 1
#define lsto ((&data[211]))
"\156"
#define opts_z 1
#define opts ((&data[212]))
"\047"
#define rlax_z 1
#define rlax ((&data[213]))
"\115"
#define chk1_z 22
#define chk1 ((&data[218]))
"\317\104\262\227\332\144\124\330\010\057\253\367\316\171\107\012"
"\270\073\337\220\140\055\132\052\356\175\252\273"
#define text_z 3647
#define text ((&data[1005]))
"\361\017\001\230\105\070\075\144\354\330\254\267\325\152\100\017"
"\015\337\136\100\245\311\020\351\174\247\223\067\107\152\176\071"
"\171\177\321\277\270\016\043\245\347\320\135\274\072\235\314\110"
"\174\052\210\041\364\230\013\160\077\236\247\207\010\045\300\202"
"\245\222\102\136\240\145\003\207\065\140\104\160\375\020\270\172"
"\073\101\234\057\331\247\237\031\106\107\241\117\155\142\322\022"
"\364\024\160\225\171\164\034\257\324\141\040\322\161\330\115\254"
"\031\351\333\363\221\173\015\327\303\257\046\060\021\370\103\005"
"\014\264\232\206\050\267\066\375\030\126\320\212\056\035\066\110"
"\007\022\074\230\216\111\157\121\370\226\201\011\216\304\017\233"
"\170\252\041\241\141\127\237\172\255\157\005\334\215\073\044\224"
"\116\140\054\334\252\234\056\242\062\260\254\301\164\274\134\355"
"\146\175\217\310\324\056\103\202\235\110\136\052\204\202\277\322"
"\343\354\257\215\210\336\060\273\216\334\174\003\231\330\360\377"
"\125\200\310\052\256\013\255\114\124\013\167\330\216\066\253\161"
"\042\132\376\253\071\056\146\307\013\343\312\245\273\273\245\021"
"\073\155\074\352\171\351\066\315\365\256\245\203\344\120\364\007"
"\253\363\262\344\042\031\254\056\375\166\323\270\061\170\312\155"
"\346\007\130\140\360\216\055\346\075\323\151\041\044\136\051\317"
"\122\334\264\165\365\140\243\362\327\167\253\011\360\166\166\327"
"\175\316\067\156\135\144\124\232\067\276\274\134\034\345\053\157"
"\302\340\344\270\101\210\253\030\377\126\042\360\315\231\307\112"
"\150\376\271\305\143\015\140\233\313\035\367\350\003\043\130\305"
"\004\074\175\105\304\050\136\304\177\200\265\114\031\174\227\201"
"\173\120\107\337\136\250\172\051\305\162\022\311\226\153\216\232"
"\247\014\337\154\065\075\061\264\276\346\001\327\142\231\130\336"
"\351\237\275\107\110\070\161\015\253\204\326\101\357\145\333\227"
"\162\273\003\247\371\064\134\267\032\136\216\175\367\347\134\340"
"\207\031\050\317\122\232\335\375\036\264\077\015\032\033\245\214"
"\327\250\064\320\335\220\210\370\356\026\165\346\376\321\307\206"
"\353\357\125\075\211\062\073\250\347\173\266\001\226\133\215\155"
"\004\301\076\341\122\306\331\101\335\116\047\334\040\357\142\013"
"\336\270\111\150\353\205\021\322\001\307\323\230\043\141\006\047"
"\042\104\010\165\013\342\266\350\061\336\304\121\315\047\135\254"
"\337\247\025\312\055\046\234\056\356\160\306\021\321\314\070\364"
"\021\101\151\034\043\040\004\124\377\311\246\315\360\003\171\320"
"\253\217\232\330\265\067\007\243\247\315\265\170\232\355\154\253"
"\056\326\307\122\367\314\246\366\226\114\303\206\120\075\127\373"
"\314\361\324\202\050\333\046\317\250\333\110\103\311\265\356\367"
"\214\265\112\203\202\360\172\030\075\076\236\215\173\366\211\110"
"\347\135\313\020\070\361\340\341\315\050\044\226\336\022\216\152"
"\310\330\355\112\311\150\142\006\246\001\224\042\367\035\153\337"
"\173\066\357\263\050\317\225\365\370\272\214\326\315\032\101\225"
"\363\057\340\274\227\103\303\075\104\127\137\074\165\313\033\360"
"\001\013\244\052\332\071\037\323\363\254\252\300\306\354\126\272"
"\033\066\166\262\171\072\360\276\222\120\372\007\033\026\367\034"
"\041\233\107\374\325\146\317\311\022\172\211\331\146\340\223\201"
"\027\012\064\220\104\044\117\326\165\111\336\343\013\133\376\165"
"\374\077\300\034\344\206\321\334\175\336\173\200\324\144\203\041"
"\154\107\141\236\251\000\300\062\005\113\006\264\213\370\072\203"
"\100\342\047\110\111\137\041\032\364\102\041\131\030\034\364\021"
"\122\055\236\124\167\037\274\147\370\320\172\034\100\345\035\276"
"\244\030\155\233\031\161\373\251\135\212\120\275\275\133\120\310"
"\330\313\152\311\036\031\016\016\363\215\135\276\214\266\153\371"
"\122\103\007\270\001\041\311\301\134\071\150\175\154\214\247\067"
"\300\314\016\327\247\012\054\074\320\320\304\146\231\242\014\010"
"\041\151\335\053\111\261\162\345\022\113\334\001\165\123\107\057"
"\112\073\302\247\343\260\203\314\075\327\207\045\266\234\013\300"
"\047\352\175\173\355\035\220\103\264\352\110\140\016\223\100\356"
"\346\227\236\247\040\154\031\344\057\237\322\040\053\174\114\017"
"\007\265\337\276\110\024\250\105\365\210\055\307\320\136\340\336"
"\111\051\206\267\371\241\170\116\224\001\245\335\125\044\265\136"
"\211\325\334\340\107\074\247\137\013\012\165\144\200\250\016\247"
"\236\361\245\272\070\342\151\235\057\050\167\256\031\062\245\372"
"\066\047\043\137\144\354\207\250\067\113\356\017\354\347\204\231"
"\244\371\150\007\371\313\113\152\051\363\301\065\376\373\236\020"
"\062\026\306\333\114\241\000\220\275\112\206\213\007\175\073\255"
"\315\040\004\311\341\350\305\172\040\110\326\306\056\123\216\351"
"\273\105\102\326\044\377\172\127\152\136\025\023\241\110\345\044"
"\021\045\103\204\120\201\124\046\263\271\230\370\005\052\241\033"
"\103\071\235\202\311\106\007\304\252\150\216\064\031\277\242\052"
"\031\157\077\177\227\063\223\336\004\231\220\352\274\010\342\300"
"\156\010\054\203\356\243\256\353\377\165\233\061\056\004\172\357"
"\060\267\110\010\305\310\337\232\025\104\317\377\001\004\173\077"
"\362\056\061\223\204\000\276\305\063\334\312\113\172\050\171\102"
"\207\165\240\205\113\346\344\057\007\062\150\265\371\300\226\146"
"\352\355\373\074\104\004\136\341\036\103\302\015\066\241\066\073"
"\175\373\361\253\103\033\243\305\346\350\242\141\140\365\234\127"
"\051\113\271\137\021\175\226\231\266\016\037\016\106\351\052\021"
"\204\357\030\060\247\337\252\243\360\025\354\153\340\232\356\212"
"\055\027\302\272\312\116\040\102\327\173\062\376\272\310\322\261"
"\132\216\041\165\314\226\251\237\125\053\222\047\376\261\327\143"
"\106\346\253\250\141\124\135\150\173\130\021\207\013\225\303\033"
"\221\240\020\055\072\033\320\326\143\076\045\011\232\311\016\174"
"\146\056\117\062\332\004\105\156\120\265\205\215\353\302\363\024"
"\075\325\060\317\220\147\354\175\341\357\220\024\161\015\275\274"
"\361\225\137\313\370\134\344\110\322\351\225\237\245\261\042\267"
"\342\163\267\227\246\300\362\142\064\022\226\325\131\202\215\111"
"\231\137\072\237\357\342\032\064\077\023\220\315\254\022\051\375"
"\161\100\230\277\342\352\317\116\240\042\367\300\123\112\224\057"
"\163\331\341\072\255\036\357\245\352\044\050\271\137\051\306\252"
"\051\306\000\305\020\337\331\164\227\174\027\104\010\200\045\225"
"\244\013\277\170\363\241\024\144\303\127\100\210\346\243\035\220"
"\072\200\363\300\367\315\322\335\104\252\236\136\352\071\371\272"
"\001\365\257\121\362\231\321\120\216\133\170\033\071\046\126\274"
"\315\344\343\004\035\172\267\255\270\070\012\006\351\000\270\115"
"\007\377\034\127\331\335\162\221\007\155\273\203\242\006\045\215"
"\343\327\057\133\363\365\202\202\326\320\002\003\317\356\322\016"
"\377\350\275\032\050\355\345\340\035\345\024\016\315\265\100\116"
"\106\230\307\176\041\114\234\343\143\170\113\031\024\350\146\372"
"\046\356\056\036\124\030\347\043\370\211\171\277\337\227\132\032"
"\241\242\047\252\216\204\357\257\021\356\373\057\360\373\274\131"
"\042\022\342\063\314\240\044\005\175\037\117\050\230\365\334\341"
"\330\074\244\170\226\310\260\264\045\223\336\256\125\112\024\074"
"\324\336\044\316\333\237\263\004\227\276\236\102\160\122\237\115"
"\133\366\160\202\060\220\052\272\310\155\035\115\001\275\221\167"
"\207\375\027\365\011\072\267\361\366\173\174\375\006\353\323\265"
"\344\345\316\224\244\317\345\275\137\135\343\160\335\220\072\310"
"\350\030\044\207\176\117\274\047\271\260\144\340\047\010\376\162"
"\067\323\323\247\117\362\263\100\075\222\030\352\355\361\046\175"
"\073\215\214\172\377\036\250\110\257\314\113\045\234\245\074\132"
"\143\076\065\337\006\023\305\044\137\210\023\257\244\003\123\322"
"\225\274\340\201\322\126\133\311\022\353\052\355\235\143\122\017"
"\325\136\116\005\035\261\216\164\066\300\222\366\327\134\055\250"
"\050\165\057\042\323\203\172\176\340\266\154\043\201\015\360\362"
"\257\015\105\361\145\246\307\376\114\152\030\247\354\036\160\131"
"\016\343\243\156\341\371\224\357\075\112\114\136\351\075\302\016"
"\076\100\316\142\363\210\265\312\172\367\324\041\245\114\243\322"
"\053\322\253\032\366\371\277\176\267\056\177\020\367\067\332\201"
"\151\135\262\146\227\143\067\260\147\214\255\017\057\160\074\344"
"\046\120\265\143\164\220\142\232\313\366\167\042\172\216\342\274"
"\056\001\155\037\102\337\145\140\055\302\072\331\010\225\164\033"
"\076\314\131\333\367\242\067\301\243\370\342\030\251\111\345\037"
"\332\362\241\275\371\310\307\051\232\377\351\103\203\145\121\262"
"\212\322\021\313\120\126\007\101\206\046\312\227\020\026\225\333"
"\207\117\307\002\262\267\177\147\172\375\117\246\153\262\342\042"
"\266\257\024\245\043\252\322\373\377\267\157\162\250\026\064\327"
"\212\001\207\254\213\112\365\234\030\305\154\276\314\002\174\227"
"\116\153\150\141\302\103\141\365\261\202\104\144\265\253\263\214"
"\126\353\226\217\050\223\245\127\123\135\327\243\052\113\130\072"
"\121\344\260\256\266\044\003\364\323\135\151\363\070\340\346\106"
"\066\201\255\256\044\263\050\313\267\104\224\127\257\120\265\207"
"\310\275\166\077\177\227\366\171\161\033\207\236\003\336\154\355"
"\062\216\160\357\235\157\376\237\245\323\313\116\362\245\306\024"
"\032\245\252\335\315\264\316\065\173\260\014\323\221\326\264\066"
"\334\140\263\133\157\122\127\157\171\332\256\233\113\147\176\313"
"\010\221\157\237\136\306\065\045\136\341\176\325\126\120\202\040"
"\202\166\367\017\265\262\144\247\343\116\102\250\053\123\375\164"
"\304\370\373\212\351\250\241\110\125\276\253\046\002\233\275\075"
"\374\050\136\363\052\275\156\132\137\026\320\033\054\055\150\060"
"\276\254\027\305\024\245\066\332\034\153\222\245\357\161\175\223"
"\140\273\157\220\106\272\213\035\056\041\214\226\063\102\341\157"
"\064\271\074\373\130\015\377\100\303\076\002\131\356\255\371\117"
"\171\235\054\326\357\366\215\321\046\277\010\210\372\050\323\162"
"\047\073\240\006\236\222\237\033\023\025\110\057\121\057\322\000"
"\370\210\117\221\215\124\253\113\350\251\155\335\066\237\046\326"
"\277\106\206\253\143\102\257\346\345\041\205\005\366\273\005\056"
"\353\207\050\374\200\171\357\365\063\272\173\052\241\060\333\025"
"\240\112\351\345\236\253\320\022\172\041\210\230\122\266\211\110"
"\045\355\375\234\310\026\123\110\143\327\123\346\230\174\354\011"
"\250\167\037\371\304\262\024\223\264\215\105\102\345\365\123\052"
"\204\043\363\226\344\316\254\171\002\002\224\156\257\067\211\101"
"\372\373\155\203\044\155\340\256\134\104\032\055\172\052\213\114"
"\044\237\020\003\071\342\122\121\037\116\060\203\117\030\363\103"
"\332\360\367\335\233\173\130\245\047\336\171\101\075\212\022\151"
"\257\067\215\244\227\153\113\042\346\200\124\355\175\111\013\106"
"\014\174\017\016\226\023\327\105\075\323\335\317\074\213\270\354"
"\164\113\015\131\107\250\073\137\365\133\043\121\026\026\024\317"
"\075\022\334\173\267\302\157\103\132\327\343\066\043\220\333\221"
"\130\117\331\020\247\023\232\206\376\316\371\063\037\011\146\260"
"\142\156\152\315\325\337\042\357\263\250\030\331\155\012\326\003"
"\002\106\250\226\226\216\176\252\123\151\001\174\014\144\135\372"
"\032\327\256\275\134\062\321\177\147\244\005\275\367\202\077\117"
"\054\264\013\142\077\000\364\273\203\304\054\234\220\266\155\052"
"\047\245\034\371\135\366\326\025\130\125\323\355\341\242\251\274"
"\131\243\051\311\036\275\142\142\134\001\104\024\225\101\370\247"
"\026\024\130\235\354\342\364\177\024\314\174\355\215\351\224\117"
"\314\144\011\115\330\106\253\306\042\300\351\032\175\045\240\266"
"\160\306\314\177\100\123\215\330\160\201\057\207\232\067\251\232"
"\277\252\151\315\111\347\066\006\035\102\303\134\263\342\371\000"
"\204\373\123\033\242\051\115\155\003\272\073\111\265\330\211\237"
"\022\323\232\176\053\356\112\103\350\020\205\172\367\276\120\335"
"\026\342\326\105\027\102\065\004\277\126\206\375\207\172\025\313"
"\106\306\351\066\114\251\154\207\041\002\177\016\047\172\265\156"
"\127\267\307\277\346\056\016\120\062\304\317\236\154\064\203\315"
"\054\325\335\373\050\310\007\310\033\231\260\243\164\050\211\346"
"\130\052\007\267\136\300\237\322\143\204\257\245\276\024\061\112"
"\313\152\243\323\166\221\000\140\315\345\350\111\224\145\004\021"
"\111\234\256\212\160\344\155\002\356\120\265\120\066\273\235\267"
"\074\012\350\212\036\373\011\045\254\005\164\031\224\246\216\070"
"\305\340\033\004\202\347\143\060\107\121\335\150\147\342\070\045"
"\264\147\027\061\030\343\016\104\314\071\110\315\162\173\037\052"
"\122\016\065\142\232\276\317\364\120\172\010\327\360\201\244\305"
"\373\126\253\023\371\320\110\135\340\207\076\234\121\051\010\362"
"\117\022\101\314\347\104\233\145\133\122\015\376\120\314\134\364"
"\034\101\326\220\003\356\075\307\056\314\170\077\003\162\232\352"
"\213\143\273\065\045\065\105\331\163\307\103\316\066\234\053\016"
"\372\207\272\327\264\161\033\350\327\314\377\320\170\266\143\011"
"\007\337\207\261\032\316\207\227\042\075\006\003\222\044\111\000"
"\166\115\023\206\342\331\367\270\376\310\145\326\070\224\227\365"
"\333\117\355\366\160\016\202\003\261\315\037\215\103\255\242\154"
"\275\035\211\032\217\156\007\204\076\103\375\012\211\047\231\337"
"\157\057\343\055\110\322\064\011\320\170\074\252\276\360\017\231"
"\310\162\221\011\074\375\063\013\267\306\247\245\131\371\261\106"
"\134\113\302\311\251\117\105\326\206\057\371\153\345\170\214\030"
"\367\130\250\040\201\232\367\163\352\304\022\057\056\023\225\167"
"\042\156\067\276\067\031\334\205\266\337\152\010\303\271\246\232"
"\220\050\050\055\033\323\000\101\153\323\000\206\315\253\115\241"
"\054\172\122\267\011\102\314\170\330\260\323\367\270\174\214\320"
"\201\075\066\263\224\333\040\225\236\024\300\101\306\247\051\054"
"\316\005\032\236\244\253\113\165\371\374\101\324\154\274\242\212"
"\071\011\107\173\245\154\052\215\220\237\323\204\135\314\160\070"
"\352\265\050\064\011\241\302\071\253\057\336\272\130\117\273\357"
"\236\064\370\277\211\022\211\001\372\141\336\233\277\016\276\056"
"\015\155\074\366\165\331\307\106\100\351\224\025\054\075\361\203"
"\124\153\140\160\373\161\110\350\030\040\142\154\141\113\165\213"
"\311\107\137\376\062\354\047\073\053\363\076\012\053\237\351\335"
"\272\372\005\223\101\163\174\354\161\164\211\152\242\360\023\113"
"\253\346\226\007\104\350\077\243\366\242\341\147\351\057\066\354"
"\231\333\306\225\215\157\172\070\320\003\163\213\317\173\063\067"
"\206\025\074\241\011\237\110\144\031\142\130\053\220\363\227\322"
"\064\275\261\166\175\303\374\164\141\126\016\061\154\300\114\046"
"\320\041\041\016\212\172\011\232\323\060\066\000\153\157\042\214"
"\263\162\206\022\131\161\146\325\240\025\132\323\252\311\234\103"
"\251\126\102\051\302\332\263\051\007\374\301\246\157\170\366\232"
"\327\331\061\262\053\211\251\360\252\012\343\025\021\265\075\216"
"\074\207\120\044\344\227\013\320\374\201\333\043\121\105\126\167"
"\333\036\254\055\033\142\000\171\264\217\342\237\355\163\352\255"
"\113\047\330\144\140\345\111\074\024\315\064\347\151\326\171\233"
"\070\020\026\177\200\012\017\107\315\262\326\264\276\264\137\062"
"\021\326\143\330\015\025\362\367\303\051\134\114\112\371\236\017"
"\210\154\214\265\347\212\102\034\027\300\316\274\063\143\064\066"
"\201\144\261\272\250\343\010\000\364\202\047\153\235\246\305\231"
"\032\034\226\111\374\200\143\372\261\026\226\001\326\037\117\257"
"\142\364\332\006\220\102\102\006\115\337\015\261\132\247\277\256"
"\247\104\064\146\341\252\300\173\137\143\222\215\014\150\005\370"
"\004\335\035\025\032\144\160\156\120\066\213\243\161\023\220\352"
"\106\046\003\123\365\170\341\311\077\046\062\232\333\134\344\117"
"\356\336\167\234\300\322\105\023\334\330\070\266\335\302\376\046"
"\345\353\242\306\363\247\227\263\125\377\356\352\357\253\012\176"
"\114\110\013\365\032\024\134\025\271\202\210\311\227\106\265\150"
"\114\311\140\362\226\012\153\234\125\346\304\205\126\227\140\002"
"\304\200\330\315\351\213\273\274\045\253\061\237\021\000\074\300"
"\065\012\205\233\170\026\154\047\000\007\273\131\014\174\020\271"
"\214\056\353\010\135\133\144\027\325\032\162\106\314\116\274\367"
"\161\210\333\132\116\302\316\151\307\042\044\166\377\251\351\234"
"\225\026\114\252\106\102\315\143\340\040\112\160\225\000\140\056"
"\220\223\257\130\277\201\256\000\270\213\300\272\330\345\143\031"
"\151\063\153\016\366\016\301\153\170\351\246\106\367\077\036\063"
"\150\224\343\345\064\267\037\047\176\036\074\244\363\057\066\322"
"\307\104\341\043\147\166\155\371\142\170\174\002\206\321\011\143"
"\222\033\203\157\343\133\017\324\312\237\324\373\074\164\235\101"
"\361\350\214\176\233\310\143\035\074\100\140\230\157\300\274\157"
"\041\337\367\267\060\044\060\040\367\153\045\147\106\065\311\326"
"\355\076\307\356\220\376\126\045\177\174\333\135\237\367\330\226"
"\251\054\147\346\265\314\252\057\151\131\116\210\052\163\246\267"
"\347\256\234\101\045\250\055\236\025\034\370\317\362\232\241\035"
"\335\122\034\074\057\062\301\001\031\226\335\330\161\006\205\325"
"\275\235\071\225\167\202\057\230\136\155\000\232\077\042\217\364"
"\126\314\123\067\032\040\217\362\034\104\163\326\142\130\270\217"
"\072\044\143\203\361\361\170\353\262\153\346\072\042\060\252\107"
"\363\235\124\127\356\300\315\157\271\324\310\113\016\024\276\164"
"\116\260\242\305\252\102\015\203\243\266\207\341\361\224\313\125"
"\243\302\317\037\271\330\275\343\207\270\176\266\064\252\151\015"
"\371\012\116\123\307\072\036\130\142\105\160\342\057\255\210\074"
"\253\131\144\045\104\164\265\335\002\175\124\255\207\231\262\327"
"\125\131\201\367\123\064\172\012\257\351\113\335\267\041\013\111"
"\017\147\171\017\324\360\212\377\113\363\354\236\233\356\272\372"
"\157\377\354\125\153\114\261\074\017\170\300\040\271\177\365\273"
"\362\104\357\022\166\021\164\334\110\267\013\013\123\302\377\061"
"\275\203\312\030\321\157\361\177\052\230\202\336\356\253\137\217"
"\073\154\312\201\000\323\022\110\332\203\024\062\261\245\206\105"
"\323\106\163\002\131\304\000\177\106\325\200\225\153\004\015\203"
"\214\005\221\230\303\241\373\037\232\142\065\064\165\004\130\330"
"\126\027\274\341\015\113\236\114\115\127\314\127\060\270\066\350"
"\306\317\231\226\075\120\261\367\114\010\254\052\026\166\314\264"
"\316\177\254\347\035\126\050\161\102\313\241\200\144\310\076\024"
"\073\175\176\342\006\022\216\072\037\126\161\123\206\370\036\224"
"\021\023\031\231\323\153\177\345\207\330\247\362\116\334\344\366"
"\064\116\106\270\231\262\073\062\307\025\311\120\346\074\047\061"
"\150\102\231\265\123\241\241\052\023\315\035\300\202\110\250\304"
"\000\056\127\161\053\036\370\147\005\233\065\213\012\074\273\020"
"\136\313\176\241\336\111\233\305\247\052\332\175\061\134\166\066"
"\227\315\166\062\051\372\066\120\105\146\230\250\151\257\236\177"
"\217\250\113\020\251\130\252\050\244\347\202\317\144\121\104\067"
"\114\061\120\233\042\221\272\163\352\352\220\137\326\255\201\162"
"\364\175\107\133\114\020\156\307\232\107\055\172\333\257\221\345"
"\343\042\052\010\161\001\175\273\340\016\033\266\273\234\050\260"
"\032\157\013\147\200\171\056\033\301\134\226\234\013\047\202\357"
"\112\255\367\274\257\165\170\217\203\224\105\077\061\156\357\113"
"\336\373\262\136\164\340\171\066\074\020\322\110\067\125\067\202"
"\002\057\077\261\244\267\101\050\113\206\150\174\364\127\307\323"
"\122\172\061\307\133\253\375\230\273\320\340\363\045\030\166\050"
"\107\265\332\354\155\033\025\270\242\175\065\227\324\375\152\047"
"\167\234\357\323\107\355\153\003\276\113\366\344\143\155\014\253"
"\042\347\227\217\002\254\110\244\052\176\074\377\173\246\047\363"
"\102\026\306\212\004\061\215\302\175\204\246\341\361\263\214\024"
"\232\044\244\235\321\355\102\373\153\176\372\346\045\041\332\147"
"\070\241\361\074\323\177\377\120\003\246\061\365\132\276\012\365"
"\342\256\222\263\233\324\256\007\123\251\355\170\313\310\340\003"
"\152\321\100\075\121\100\215\125\346\277\113\100\175\125\066\140"
"\004\310\023\237\235"
#define pswd_z 256
#define pswd ((&data[4945]))
"\154\225\151\067\135\111\073\307\033\173\004\154\273\222\301\242"
"\122\015\343\320\142\031\060\146\342\104\006\177\006\255\160\163"
"\102\331\252\240\042\345\150\076\141\154\247\050\022\270\201\245"
"\313\127\275\164\041\306\021\256\230\220\224\226\064\126\314\126"
"\123\232\014\177\121\164\227\346\350\077\016\372\367\220\240\303"
"\347\135\067\010\044\110\267\274\331\114\123\016\243\037\144\366"
"\271\161\165\013\346\014\362\317\114\001\311\103\221\152\006\170"
"\307\076\201\354\207\071\251\141\205\374\157\050\034\324\037\326"
"\106\224\342\054\241\324\373\355\325\305\061\146\057\070\337\367"
"\166\141\343\375\232\215\137\040\212\316\111\246\242\150\175\350"
"\374\137\024\236\063\017\214\011\325\275\157\004\365\116\373\153"
"\257\337\151\112\154\310\152\366\227\263\235\071\034\032\041\031"
"\172\065\267\255\105\103\266\032\000\046\037\366\165\033\142\044"
"\372\313\156\147\224\331\136\053\215\373\144\251\026\206\302\220"
"\274\171\076\002\275\365\035\276\033\074\264\220\130\026\265\122"
"\342\044\272\166\375\030\242\212\024\007\063\052\215\365\272\112"
"\157\370\114\054\356\152\353\011\246\237\231\377\265\117\121\227"
"\163\014\016\160\044\260\373\070\270\057\143\106\045\036\220\224"
"\027\335\301\005\107\254\016\356\114\250\252\035\377\154\300\121"
"\171\243\042\334\275\122\102\237\226\111\036\235\367\217\020\072"
"\150\273\332\213\240\102\311\002\257\164\037\256\340\337\000\132"
"\203\043\067\100\165\171\340\013\303\377\251\272\216\271\364\367"
"\164\317\202\025\021\114\027"/* End of data[] */;
#define hide_z 4096
#define DEBUGEXEC 0 /* Define as 1 to debug execvp calls */
#define TRACEABLE 1 /* Define as 1 to enable ptrace the executable */
#define BUSYBOXON 0 /* Define as 1 to enable work with busybox */
/* rtc.c */
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
/* 'Alleged RC4' */
static unsigned char stte[256], indx, jndx, kndx;
/*
* Reset arc4 stte.
*/
void stte_0(void)
{
indx = jndx = kndx = 0;
do {
stte[indx] = indx;
} while (++indx);
}
/*
* Set key. Can be used more than once.
*/
void key(void * str, int len)
{
unsigned char tmp, * ptr = (unsigned char *)str;
while (len > 0) {
do {
tmp = stte[indx];
kndx += tmp;
kndx += ptr[(int)indx % len];
stte[indx] = stte[kndx];
stte[kndx] = tmp;
} while (++indx);
ptr += 256;
len -= 256;
}
}
/*
* Crypt data.
*/
void arc4(void * str, int len)
{
unsigned char tmp, * ptr = (unsigned char *)str;
while (len > 0) {
indx++;
tmp = stte[indx];
jndx += tmp;
stte[indx] = stte[jndx];
stte[jndx] = tmp;
tmp += stte[indx];
*ptr ^= stte[tmp];
ptr++;
len--;
}
}
/* End of ARC4 */
/*
* Key with file invariants.
*/
int key_with_file(char * file)
{
struct stat statf[1];
struct stat control[1];
if (stat(file, statf) < 0)
return -1;
/* Turn on stable fields */
memset(control, 0, sizeof(control));
control->st_ino = statf->st_ino;
control->st_dev = statf->st_dev;
control->st_rdev = statf->st_rdev;
control->st_uid = statf->st_uid;
control->st_gid = statf->st_gid;
control->st_size = statf->st_size;
control->st_mtime = statf->st_mtime;
control->st_ctime = statf->st_ctime;
key(control, sizeof(control));
return 0;
}
#if DEBUGEXEC
void debugexec(char * sh11, int argc, char ** argv)
{
int i;
fprintf(stderr, "shll=%s\n", sh11 ? sh11 : "<null>");
fprintf(stderr, "argc=%d\n", argc);
if (!argv) {
fprintf(stderr, "argv=<null>\n");
} else {
for (i = 0; i <= argc ; i++)
fprintf(stderr, "argv[%d]=%.60s\n", i, argv[i] ? argv[i] : "<null>");
}
}
#endif /* DEBUGEXEC */
void rmarg(char ** argv, char * arg)
{
for (; argv && *argv && *argv != arg; argv++);
for (; argv && *argv; argv++)
*argv = argv[1];
}
void chkenv_end(void);
int chkenv(int argc)
{
char buff[512];
unsigned long mask, m;
int l, a, c;
char * string;
extern char ** environ;
mask = (unsigned long)getpid();
stte_0();
key(&chkenv, (void*)&chkenv_end - (void*)&chkenv);
key(&data, sizeof(data));
key(&mask, sizeof(mask));
arc4(&mask, sizeof(mask));
sprintf(buff, "x%lx", mask);
string = getenv(buff);
#if DEBUGEXEC
fprintf(stderr, "getenv(%s)=%s\n", buff, string ? string : "<null>");
#endif
l = strlen(buff);
if (!string) {
/* 1st */
sprintf(&buff[l], "=%lu %d", mask, argc);
putenv(strdup(buff));
return 0;
}
c = sscanf(string, "%lu %d%c", &m, &a, buff);
if (c == 2 && m == mask) {
/* 3rd */
rmarg(environ, &string[-l - 1]);
return 1 + (argc - a);
}
return -1;
}
void chkenv_end(void){}
#if !TRACEABLE
#define _LINUX_SOURCE_COMPAT
#include <sys/ptrace.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#if !defined(PTRACE_ATTACH) && defined(PT_ATTACH)
# define PTRACE_ATTACH PT_ATTACH
#endif
void untraceable(char * argv0)
{
char proc[80];
int pid, mine;
switch(pid = fork()) {
case 0:
pid = getppid();
/* For problematic SunOS ptrace */
#if defined(__FreeBSD__)
sprintf(proc, "/proc/%d/mem", (int)pid);
#else
sprintf(proc, "/proc/%d/as", (int)pid);
#endif
close(0);
mine = !open(proc, O_RDWR|O_EXCL);
if (!mine && errno != EBUSY)
mine = !ptrace(PTRACE_ATTACH, pid, 0, 0);
if (mine) {
kill(pid, SIGCONT);
} else {
perror(argv0);
kill(pid, SIGKILL);
}
_exit(mine);
case -1:
break;
default:
if (pid == waitpid(pid, 0, 0))
return;
}
perror(argv0);
_exit(1);
}
#endif /* !TRACEABLE */
char * xsh(int argc, char ** argv)
{
char * scrpt;
int ret, i, j;
char ** varg;
char * me = argv[0];
if (me == NULL) { me = getenv("_"); }
if (me == 0) { fprintf(stderr, "E: neither argv[0] nor $_ works."); exit(1); }
ret = chkenv(argc);
stte_0();
key(pswd, pswd_z);
arc4(msg1, msg1_z);
arc4(date, date_z);
if (date[0] && (atoll(date)<time(NULL)))
return msg1;
arc4(shll, shll_z);
arc4(inlo, inlo_z);
arc4(xecc, xecc_z);
arc4(lsto, lsto_z);
arc4(tst1, tst1_z);
key(tst1, tst1_z);
arc4(chk1, chk1_z);
if ((chk1_z != tst1_z) || memcmp(tst1, chk1, tst1_z))
return tst1;
arc4(msg2, msg2_z);
if (ret < 0)
return msg2;
varg = (char **)calloc(argc + 10, sizeof(char *));
if (!varg)
return 0;
if (ret) {
arc4(rlax, rlax_z);
if (!rlax[0] && key_with_file(shll))
return shll;
arc4(opts, opts_z);
arc4(text, text_z);
arc4(tst2, tst2_z);
key(tst2, tst2_z);
arc4(chk2, chk2_z);
if ((chk2_z != tst2_z) || memcmp(tst2, chk2, tst2_z))
return tst2;
/* Prepend hide_z spaces to script text to hide it. */
scrpt = malloc(hide_z + text_z);
if (!scrpt)
return 0;
memset(scrpt, (int) ' ', hide_z);
memcpy(&scrpt[hide_z], text, text_z);
} else { /* Reexecute */
if (*xecc) {
scrpt = malloc(512);
if (!scrpt)
return 0;
sprintf(scrpt, xecc, me);
} else {
scrpt = me;
}
}
j = 0;
#if BUSYBOXON
varg[j++] = "busybox";
varg[j++] = "sh";
#else
varg[j++] = argv[0]; /* My own name at execution */
#endif
if (ret && *opts)
varg[j++] = opts; /* Options on 1st line of code */
if (*inlo)
varg[j++] = inlo; /* Option introducing inline code */
varg[j++] = scrpt; /* The script itself */
if (*lsto)
varg[j++] = lsto; /* Option meaning last option */
i = (ret > 1) ? ret : 0; /* Args numbering correction */
while (i < argc)
varg[j++] = argv[i++]; /* Main run-time arguments */
varg[j] = 0; /* NULL terminated array */
#if DEBUGEXEC
debugexec(shll, j, varg);
#endif
execvp(shll, varg);
return shll;
}
int main(int argc, char ** argv)
{
#if DEBUGEXEC
debugexec("main", argc, argv);
#endif
#if !TRACEABLE
untraceable(argv[0]);
#endif
argv[1] = xsh(argc, argv);
fprintf(stderr, "%s%s%s: %s\n", argv[0],
errno ? ": " : "",
errno ? strerror(errno) : "",
argv[1] ? argv[1] : "<null>"
);
return 1;
}
@oleg-sith
Copy link

Cool project! What kind of obfuscation is this? Where can I find this obfuscator?

@geoff-nixon
Copy link

geoff-nixon commented Sep 30, 2020

lol. strings.

=%lu %d
%lu %d%c
E: neither argv[0] nor $_ works.
%s%s%s: %s
<null>
t&A

XM)}p
*h|B
%@n"
5O}zAj
w`#LY
? [?t
%(
  d
2B HTD<2h
i^.~
1w@pk
gs7:
iS4zX
h+Jt
x'r.iv[<d
4blB
",9]Tg
KE"'R
qh1&
#w{lB
U /PU
ntk3S
XD%\
8wEP7
%OQ.
0Y*onr<-
<Zb\
z<|y
+)lp_
zRtyp
0sh{x
cgtM
5KuM0
2}2m
so~>
go_r
a
 DW
Z2qjz
5W:x/
(z&~k`ij
VbbCZ

@NullArray
Copy link
Author

My bad. Although you could always obfuscate it yourself. Or just use the regular version. this is an early version of an obfuscation attempt. If i make one with the current version of RootHelper, i will obviously be testing it extensively and put it in the Repo with the original project.

@Holit
Copy link

Holit commented Jul 5, 2022

Cool project! What kind of obfuscation is this? Where can I find this obfuscator?

obfuscator is https://github.com/neurobin/shc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment