mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-10-25 19:52:20 +08:00
regenerate sender-d_aarch64.sh.c,not sure it work everywhere
This commit is contained in:
parent
710cd9fa5c
commit
ceb43da10b
@ -1,252 +1,315 @@
|
||||
#if 0
|
||||
shc Version 3.9.6, Generic Shell Script Compiler
|
||||
shc Version 4.0.3, Generic Shell Script Compiler
|
||||
GNU GPL Version 3 Md Jahidul Hamid <jahidulhamid@yahoo.com>
|
||||
|
||||
shc -f sender-d.sh
|
||||
#endif
|
||||
|
||||
static char data [] =
|
||||
#define rlax_z 1
|
||||
#define rlax ((&data[0]))
|
||||
"\063"
|
||||
#define tst1_z 22
|
||||
#define tst1 ((&data[4]))
|
||||
"\361\021\166\247\054\162\052\130\306\260\015\342\206\111\251\225"
|
||||
"\014\257\133\377\311\127\030\125\000\302\054\054\113\243"
|
||||
#define text_z 1976
|
||||
#define text ((&data[444]))
|
||||
"\371\056\127\353\324\272\303\246\127\103\073\027\017\312\311\013"
|
||||
"\011\120\251\004\101\273\172\004\347\246\120\212\167\046\371\161"
|
||||
"\124\121\134\051\014\037\320\143\142\013\173\161\326\104\175\337"
|
||||
"\224\047\343\326\342\135\332\311\004\052\124\173\120\116\354\245"
|
||||
"\237\111\316\254\150\236\017\313\252\212\075\200\317\273\137\144"
|
||||
"\342\103\072\304\240\025\216\245\077\343\041\220\061\015\065\321"
|
||||
"\126\004\176\277\243\215\212\115\030\310\315\350\203\055\114\145"
|
||||
"\160\207\052\021\234\270\267\334\234\330\154\315\346\242\237\075"
|
||||
"\246\035\374\112\253\207\227\304\117\145\254\322\223\370\070\004"
|
||||
"\200\142\026\034\033\315\370\267\245\145\205\213\007\045\310\256"
|
||||
"\103\304\370\356\114\220\263\234\366\137\156\211\130\247\216\330"
|
||||
"\012\244\364\045\161\355\335\027\122\143\242\131\210\152\010\313"
|
||||
"\057\000\272\173\221\155\030\207\314\206\021\045\056\237\376\070"
|
||||
"\104\363\136\266\340\073\315\062\236\157\214\047\332\224\362\011"
|
||||
"\225\254\205\047\032\235\256\347\044\300\014\123\140\012\213\245"
|
||||
"\375\351\133\336\045\050\021\304\227\235\353\162\062\336\173\310"
|
||||
"\213\001\357\245\237\236\215\303\137\231\026\300\244\242\145\242"
|
||||
"\214\300\200\262\350\222\166\200\060\142\363\142\101\156\053\314"
|
||||
"\160\033\162\017\272\377\323\031\231\351\331\076\214\077\340\030"
|
||||
"\377\141\312\350\364\101\151\044\244\134\206\345\313\262\261\073"
|
||||
"\315\044\112\210\043\036\242\275\007\173\373\224\272\334\254\272"
|
||||
"\076\167\242\062\270\013\126\134\150\335\102\063\217\364\156\135"
|
||||
"\030\271\345\074\327\210\371\337\004\364\163\276\320\037\171\016"
|
||||
"\227\034\101\120\047\227\254\217\164\357\303\004\343\061\141\373"
|
||||
"\352\107\067\302\317\060\241\323\045\024\222\365\064\014\004\314"
|
||||
"\050\105\034\120\335\311\340\121\270\243\126\233\324\122\357\013"
|
||||
"\070\017\057\033\361\302\125\023\157\131\212\025\047\257\370\016"
|
||||
"\010\366\143\065\131\176\051\066\270\360\232\062\302\250\250\177"
|
||||
"\136\117\242\120\250\347\324\357\214\270\132\335\126\136\050\114"
|
||||
"\222\114\360\150\163\035\211\116\174\332\227\153\326\016\366\366"
|
||||
"\072\123\302\126\122\137\270\200\001\155\105\331\354\075\055\326"
|
||||
"\220\047\224\036\275\257\275\117\123\205\136\141\102\024\270\310"
|
||||
"\107\134\354\353\353\042\127\124\122\074\302\346\005\014\334\232"
|
||||
"\152\144\130\275\141\331\214\251\153\141\043\352\112\002\315\206"
|
||||
"\340\315\070\004\346\240\255\002\135\342\156\334\237\163\250\267"
|
||||
"\175\120\003\240\051\367\113\007\247\061\171\233\300\274\140\152"
|
||||
"\235\043\211\064\154\113\027\106\256\110\210\265\050\347\221\121"
|
||||
"\267\310\161\074\356\126\221\004\312\253\305\025\012\251\360\062"
|
||||
"\056\043\144\341\034\005\004\273\234\305\201\126\233\320\266\073"
|
||||
"\024\033\223\126\012\311\022\322\312\341\043\070\146\153\137\307"
|
||||
"\046\174\220\116\101\360\320\213\035\140\366\275\075\140\157\153"
|
||||
"\073\246\030\245\010\061\134\031\012\325\245\332\235\150\054\253"
|
||||
"\342\052\334\033\222\303\163\311\046\251\332\170\177\037\020\355"
|
||||
"\246\311\236\003\146\043\116\234\127\061\176\166\001\162\066\167"
|
||||
"\015\056\045\316\155\276\113\011\010\343\044\363\001\004\030\370"
|
||||
"\303\000\137\326\235\356\336\026\132\246\200\264\155\326\201\215"
|
||||
"\016\275\072\353\002\315\252\115\353\335\007\001\244\370\112\212"
|
||||
"\130\115\005\264\250\162\010\130\042\145\272\020\337\002\303\143"
|
||||
"\064\136\343\301\174\020\243\346\321\233\146\316\263\110\222\371"
|
||||
"\173\324\003\323\254\354\004\134\367\077\346\160\061\013\030\273"
|
||||
"\025\071\021\050\235\317\024\323\161\371\220\137\042\356\235\322"
|
||||
"\174\334\201\125\241\221\376\232\271\015\175\043\007\212\335\314"
|
||||
"\073\141\100\134\277\332\242\010\162\261\021\203\244\061\026\210"
|
||||
"\360\045\322\151\304\270\114\051\125\060\362\265\005\300\134\176"
|
||||
"\132\040\215\273\264\074\312\021\141\307\236\372\376\163\037\353"
|
||||
"\103\114\213\176\350\207\272\236\112\311\030\075\165\221\006\007"
|
||||
"\104\135\121\024\270\210\031\160\205\317\344\253\016\016\124\007"
|
||||
"\025\317\220\045\070\323\354\205\017\023\063\020\041\323\236\317"
|
||||
"\133\063\271\022\224\223\147\242\104\177\276\312\000\003\267\203"
|
||||
"\361\033\051\371\035\001\051\117\304\105\007\011\115\242\160\145"
|
||||
"\036\216\162\273\025\206\107\240\254\103\314\364\221\346\316\177"
|
||||
"\107\262\376\226\114\203\167\055\077\356\170\243\016\010\140\301"
|
||||
"\135\330\346\136\037\301\177\120\042\063\206\067\155\354\036\036"
|
||||
"\072\065\346\274\130\205\372\263\062\342\275\133\124\271\311\061"
|
||||
"\074\005\056\226\126\221\056\303\113\370\216\313\062\011\205\001"
|
||||
"\212\170\377\316\345\026\014\067\065\214\071\257\046\204\226\341"
|
||||
"\343\344\100\253\112\123\307\334\170\303\334\170\070\170\130\216"
|
||||
"\224\350\020\336\230\141\067\272\233\016\035\255\206\345\101\152"
|
||||
"\233\360\260\342\101\047\335\155\334\311\257\304\226\137\001\112"
|
||||
"\071\367\057\253\342\034\230\201\077\103\207\123\142\364\264\370"
|
||||
"\223\212\164\034\031\051\045\127\315\270\323\322\133\006\247\265"
|
||||
"\366\244\012\222\175\272\273\307\144\044\066\261\124\112\270\322"
|
||||
"\001\247\234\225\324\000\007\330\033\121\236\233\367\013\233\303"
|
||||
"\311\200\315\010\104\326\274\004\257\233\267\152\367\214\367\032"
|
||||
"\021\230\307\240\350\164\045\374\345\345\374\045\322\173\333\054"
|
||||
"\005\204\271\171\313\020\064\031\375\006\352\275\324\301\312\114"
|
||||
"\120\265\001\124\371\161\043\071\271\231\136\270\344\143\315\361"
|
||||
"\072\032\246\303\242\074\250\203\153\014\320\315\361\175\251\036"
|
||||
"\277\304\162\115\132\363\362\100\255\322\241\015\120\065\102\363"
|
||||
"\024\367\330\317\210\342\155\055\320\211\337\000\052\310\345\203"
|
||||
"\030\345\265\352\343\132\015\367\120\273\362\216\123\047\367\377"
|
||||
"\130\156\215\051\154\255\045\216\115\116\310\264\331\134\122\132"
|
||||
"\177\130\266\246\346\307\226\067\014\071\076\023\266\226\205\127"
|
||||
"\027\005\334\124\302\045\263\330\276\001\264\021\000\306\112\207"
|
||||
"\077\217\057\104\303\055\362\154\334\334\376\064\275\232\337\265"
|
||||
"\253\122\270\335\274\332\326\333\176\063\321\276\041\366\001\341"
|
||||
"\361\004\263\273\361\054\251\006\330\312\171\056\016\015\265\140"
|
||||
"\173\332\351\334\001\327\024\204\304\345\034\103\371\133\140\171"
|
||||
"\074\002\111\001\357\070\252\311\003\200\064\124\151\051\342\203"
|
||||
"\144\027\000\265\046\302\105\206\132\235\061\130\313\037\206\337"
|
||||
"\354\166\300\062\161\027\051\135\277\216\143\230\106\120\063\147"
|
||||
"\253\362\275\307\302\321\255\075\370\152\164\302\341\114\037\043"
|
||||
"\227\223\140\377\264\071\127\372\324\320\116\104\332\224\200\304"
|
||||
"\131\304\007\226\074\331\073\246\154\300\175\313\226\014\132\362"
|
||||
"\357\101\356\334\024\016\346\130\216\004\226\040\221\165\244\223"
|
||||
"\015\071\034\323\226\166\244\031\376\254\364\246\104\165\223\062"
|
||||
"\045\245\144\253\154\356\016\266\264\005\005\227\012\110\050\017"
|
||||
"\366\262\144\171\055\104\200\175\234\235\061\067\043\300\105\110"
|
||||
"\037\100\220\232\123\236\125\274\047\010\331\300\206\052\335\012"
|
||||
"\316\262\014\103\256\171\333\132\042\023\325\250\131\221\362\203"
|
||||
"\324\054\333\020\307\153\031\340\155\313\174\036\023\202\017\142"
|
||||
"\303\204\115\055\057\106\104\157\152\310\061\256\174\101\036\176"
|
||||
"\324\007\062\216\152\120\276\334\260\124\126\200\274\046\273\141"
|
||||
"\311\307\037\330\307\134\261\270\306\076\272\203\022\310\252\365"
|
||||
"\313\330\110\056\045\027\350\130\301\123\351\023\325\250\322\375"
|
||||
"\244\363\314\276\050\223\174\215\161\171\357\271\007\052\065\102"
|
||||
"\062\151\205\164\272\201\162\352\221\337\316\235\353\124\031\041"
|
||||
"\037\115\204\207\051\234\263\354\171\203\152\144\271\240\362\143"
|
||||
"\121\013\327\010\167\244\123\300\022\235\233\037\240\143\273\261"
|
||||
"\325\061\137\316\357\072\367\331\267\114\102\264\215\134\272\160"
|
||||
"\241\022\353\166\141\023\052\004\110\260\165\251\236\072\256\362"
|
||||
"\344\312\344\170\125\230\056\237\220\251\005\336\255\060\211\105"
|
||||
"\026\200\072\116\104\074\370\300\242\041\125\056\273\356\173\340"
|
||||
"\146\350\357\152\330\105\045\362\174\342\202\371\047\115\356\241"
|
||||
"\233\122\325\366\346\137\132\173\166\246\120\131\171\237\031\147"
|
||||
"\362\304\065\304\040\356\303\146\353\056\322\355\246\155\336\225"
|
||||
"\135\335\344\212\171\010\254\210\002\046\004\012\015\037\270\216"
|
||||
"\110\161\212\203\164\273\322\176\207\205\166\361\157\113\172\261"
|
||||
"\304\230\024\113\117\212\360\310\243\254\104\307\001\173\013\253"
|
||||
"\206\317\037\060\354\223\356\300\146\161\052\100\234\300\175\230"
|
||||
"\224\002\056\217\233\126\045\337\314\111\231\230\074\054\360\146"
|
||||
"\144\341\142\320\023\244\022\307\360\213\023\310\213\101\023\216"
|
||||
"\275\056\245\130\375\320\213\176\177\377\251\222\132\166\312\103"
|
||||
"\117\072\242\152\275\256\033\204\210\126\026\055\343\104\167\362"
|
||||
"\165\132\173\106\245\247\263\000\205\117\353\217\371\307\214\222"
|
||||
"\111\260\301\006\074\356\025\016\152\172\350\227\372\172\055\043"
|
||||
"\007\344\200\325\221\102\227\237\315\367\045\352\220\015\224\355"
|
||||
"\324\303\142\040\227\107\130\264\334\252\076\144\053\224\100\244"
|
||||
"\345\321\074\170\271\317\040\100\152\031\233\201\103\363\015\207"
|
||||
"\232\131\054\124\052\272\350\341\212\116\254\322\307\316\002\165"
|
||||
"\362\146\015\121\352\343\335\266\273\362\020\030\035\243\064\132"
|
||||
"\110\327\003\144\000\167\333\323\272\362\144\127\236\147\057\073"
|
||||
"\061\355\072\123\242\330\300\031\245\107\143\345\142\210\162\020"
|
||||
"\244\237\025\222\265\335\034\066\150\344\000\077\143\145\204\134"
|
||||
"\066\112\166\256\030\245\250\145\374\211\240\105\316\075\005\271"
|
||||
"\221\112\303\272\352\060\133\306\245\102\164\350\007\355\170\233"
|
||||
"\015\157\306\151\156\064\376\120\377\161\263\161\214\132\114\005"
|
||||
"\325\105\215\333\163\073\023\313\314\203\035\132\153\375\263\042"
|
||||
"\265\053\016\335\163\003\075\322\006\176\213\156\234\043\024\377"
|
||||
"\103\102\035\173\057\061\152\015\327\037\250\054\334\303\243\057"
|
||||
"\240\112\002\053\266\146\135\257\347\131\000\013\264\117\235\313"
|
||||
"\351\103\357\361\243\273\161\001\127\032\322\215\377\366\164\340"
|
||||
"\137\310\110\217\242\260\165\347\340\141\241\034\352\217\105\130"
|
||||
"\003\015\341\101\173\142\326\142\075\132\315\302\033\106\164\261"
|
||||
"\212\177\221\240\344\302\137\142\326\115\221\250\052\202\103\057"
|
||||
"\177\352\147\060\244\376\316\130\127\163\076\173\146\302\041\232"
|
||||
"\350\020\266\311\033\271\157\177\121\043\005\062\312\263\262\060"
|
||||
"\075\063\047\023\221\361\020\337\050\042\132\072\247\334\211\176"
|
||||
"\127\050\002\075\374\357\362\114\042\246\244\111\110\017\264\215"
|
||||
"\002\236\114\127\232\267\226\277\377\316\201\317\376\043\243\044"
|
||||
"\070\066\031\155\103\036\071\153\144\125\274\101\036\234\223\327"
|
||||
"\077\351\162\024\241\011\324\241\327\126\161\326\171\025\372\262"
|
||||
"\114\024\037\217\063\131\373\227\256\267\331\315\123\155\244\223"
|
||||
"\127\027\247\371\040\173\232\370\321\014\316\113\041\311\375\155"
|
||||
"\335\035\375\020\166\370\250\045\257\202\362\003\360\227\226\107"
|
||||
"\256\075\100\317\271\333\307\213\347\226\327\011\137\325\167\075"
|
||||
"\362\164\115\150\154\366\215\034\170\200\037\151\027\266\260\306"
|
||||
"\363\360\226\255\314\136\071\263\364\020\275\124\345\064\221\327"
|
||||
"\250\337\100\025\326\315\062\117\115\122\270\145\010\150\054\374"
|
||||
"\131\302\251\045\041\343\331\026\363\226\152\331\313\374\261\164"
|
||||
"\334\361\211\262\277\274\001\015\016\272\163\026\042\237\022\174"
|
||||
"\142\274\242\203\237\173\231\223\022\004\155\336\000\036\122\335"
|
||||
"\020\334\217\317\230\221\335\247\113\120\275\156"
|
||||
#define chk2_z 19
|
||||
#define chk2 ((&data[2639]))
|
||||
"\122\215\215\326\254\156\367\131\245\150\023\100\222\145\033\255"
|
||||
"\221\065\047\012\113\366\232\054\011\157\300"
|
||||
#define msg1_z 65
|
||||
#define msg1 ((&data[2669]))
|
||||
"\372\165\113\114\122\134\050\147\272\275\200\201\317\154\106\232"
|
||||
"\347\373\057\320\014\123\274\261\222\205\223\033\263\362\155\320"
|
||||
"\157\217\077\166\061\374\373\334\033\035\312\163\330\110\036\276"
|
||||
"\065\375\137\264\267\307\216\263\362\023\157\214\324\042\252\153"
|
||||
"\072\341\103\047\276\003\317\212\342\054\301"
|
||||
#define lsto_z 1
|
||||
#define lsto ((&data[2737]))
|
||||
"\166"
|
||||
#define opts_z 1
|
||||
#define opts ((&data[2738]))
|
||||
"\126"
|
||||
#define chk2 ((&data[4]))
|
||||
"\243\223\200\353\204\320\241\001\062\064\032\054\240\071\234\017"
|
||||
"\210\070\320\212\121\124\300\135\224\153"
|
||||
#define date_z 1
|
||||
#define date ((&data[2739]))
|
||||
"\006"
|
||||
#define shll_z 10
|
||||
#define shll ((&data[2741]))
|
||||
"\245\120\032\327\074\336\117\215\105\162\100\162"
|
||||
#define tst2_z 19
|
||||
#define tst2 ((&data[2755]))
|
||||
"\161\312\126\130\156\376\051\126\202\366\153\372\216\321\052\312"
|
||||
"\061\263\236\122\364\211\237\304\313\353"
|
||||
#define inlo_z 3
|
||||
#define inlo ((&data[2778]))
|
||||
"\270\246\000"
|
||||
#define xecc_z 15
|
||||
#define xecc ((&data[2784]))
|
||||
"\373\163\175\232\263\074\171\320\261\163\206\331\252\020\227\143"
|
||||
"\020\246\144"
|
||||
#define chk1_z 22
|
||||
#define chk1 ((&data[2805]))
|
||||
"\141\041\203\171\275\321\255\040\267\363\057\347\326\007\040\342"
|
||||
"\271\052\224\344\246\315\077\014\343\011\120\010\037\060"
|
||||
#define pswd_z 256
|
||||
#define pswd ((&data[2882]))
|
||||
"\053\231\150\313\136\064\266\157\122\375\252\122\161\246\305\356"
|
||||
"\012\370\306\226\132\347\031\323\244\041\363\325\333\302\347\007"
|
||||
"\134\117\322\272\204\210\052\326\206\324\050\370\172\355\347\205"
|
||||
"\346\255\034\100\117\237\241\001\377\312\136\172\147\102\271\007"
|
||||
"\154\045\155\221\344\017\240\323\145\152\314\235\103\000\241\031"
|
||||
"\327\250\361\047\110\222\051\107\135\207\302\304\312\173\314\066"
|
||||
"\241\071\310\205\111\150\131\256\323\045\113\027\046\355\060\376"
|
||||
"\226\041\045\336\264\116\046\021\325\350\326\237\143\243\326\005"
|
||||
"\335\236\212\046\007\344\324\333\012\040\362\060\015\043\056\243"
|
||||
"\104\124\202\371\242\250\013\170\221\341\030\364\204\357\372\142"
|
||||
"\216\205\210\226\151\134\161\163\174\144\244\211\207\322\055\314"
|
||||
"\046\257\305\311\127\320\102\350\262\133\335\067\112\327\231\331"
|
||||
"\135\041\157\306\175\341\072\372\105\336\203\314\261\260\230\330"
|
||||
"\140\136\242\267\056\344\240\340\077\176\027\212\126\260\143\263"
|
||||
"\322\323\172\117\264\265\111\371\224\315\306\105\176\137\036\336"
|
||||
"\275\300\226\353\244\067\314\344\265\344\157\014\225\323\277\147"
|
||||
"\246\072\267\133\357\001\125\203\316\034\310\115\173\347\054\070"
|
||||
"\247\302\044\114\372\360\061\257\325\240\273\152\164\173\321\033"
|
||||
"\265\210\166\245\212\314\050\130\350\361\246\143\330\322\234\177"
|
||||
"\224\300\313\216\224\065\024\071"
|
||||
#define date ((&data[26]))
|
||||
"\252"
|
||||
#define tst1_z 22
|
||||
#define tst1 ((&data[32]))
|
||||
"\177\300\304\252\172\313\215\230\106\002\255\125\364\101\341\135"
|
||||
"\161\335\007\042\234\014\101\114\172\324\143\307\066\236"
|
||||
#define rlax_z 1
|
||||
#define rlax ((&data[57]))
|
||||
"\377"
|
||||
#define msg2_z 19
|
||||
#define msg2 ((&data[3142]))
|
||||
"\120\022\076\170\355\122\230\332\246\007\333\366\215\012\226\304"
|
||||
"\030\062\202"/* End of data[] */;
|
||||
#define msg2 ((&data[60]))
|
||||
"\010\164\351\102\052\206\050\160\045\362\330\325\051\106\211\217"
|
||||
"\020\302\217\320\234\171\300\027"
|
||||
#define pswd_z 256
|
||||
#define pswd ((&data[98]))
|
||||
"\152\326\156\232\175\121\037\170\341\237\070\245\111\263\155\177"
|
||||
"\307\025\210\226\053\222\335\204\166\203\021\074\275\314\333\275"
|
||||
"\355\076\205\170\123\201\346\270\137\131\364\033\152\167\274\062"
|
||||
"\215\104\311\271\327\246\075\115\052\117\212\350\033\146\245\011"
|
||||
"\244\053\201\370\255\150\261\015\302\245\051\054\035\345\137\252"
|
||||
"\051\050\143\001\317\241\116\371\360\331\341\014\077\207\025\344"
|
||||
"\263\227\334\140\377\216\156\301\063\227\356\120\174\115\372\246"
|
||||
"\165\136\247\105\377\366\076\360\317\040\374\016\247\021\362\132"
|
||||
"\250\317\273\250\135\051\152\221\300\130\342\075\246\334\343\034"
|
||||
"\073\213\141\072\201\237\053\121\300\047\140\147\071\123\302\342"
|
||||
"\042\176\212\200\250\364\022\151\115\364\246\363\321\212\017\014"
|
||||
"\025\160\107\227\020\162\350\320\231\110\070\323\234\373\265\276"
|
||||
"\171\077\077\042\064\121\213\201\106\061\164\027\274\203\043\322"
|
||||
"\364\152\151\004\335\122\325\167\233\015\112\067\011\377\366\202"
|
||||
"\077\066\245\163\210\060\364\316\142\151\345\036\354\011\360\341"
|
||||
"\164\132\346\121\254\273\310\110\311\023\200\322\023\166\125\122"
|
||||
"\254\372\305\064\052\272\003\214\043\350\253\020\362\233\362\146"
|
||||
#define inlo_z 3
|
||||
#define inlo ((&data[354]))
|
||||
"\077\312\066"
|
||||
#define msg1_z 65
|
||||
#define msg1 ((&data[369]))
|
||||
"\242\311\123\033\211\152\051\313\155\224\242\334\066\100\363\065"
|
||||
"\105\013\132\157\324\242\137\067\144\215\353\267\116\040\366\261"
|
||||
"\257\301\143\350\043\260\343\342\230\061\076\106\133\350\223\102"
|
||||
"\222\051\265\352\116\220\116\054\340\042\140\117\150\135\341\266"
|
||||
"\147\073\125\031\375\217\147\053\036\041\313\257\265\056\040\056"
|
||||
"\116\230\017\355\320\264\066\203\041\266\325"
|
||||
#define shll_z 10
|
||||
#define shll ((&data[448]))
|
||||
"\044\170\147\062\333\277\214\244\122\356\377\367"
|
||||
#define chk1_z 22
|
||||
#define chk1 ((&data[464]))
|
||||
"\223\122\266\274\152\146\300\203\222\104\264\157\033\126\362\342"
|
||||
"\167\271\127\371\137\202\067\371\014\044\036"
|
||||
#define xecc_z 15
|
||||
#define xecc ((&data[488]))
|
||||
"\000\372\316\341\375\256\014\324\121\207\341\240\215\364\227\320"
|
||||
"\177\340\056"
|
||||
#define text_z 1976
|
||||
#define text ((&data[739]))
|
||||
"\272\111\362\361\314\024\247\242\123\277\167\123\266\357\034\001"
|
||||
"\203\156\270\100\215\334\220\115\334\020\056\013\336\246\111\231"
|
||||
"\360\073\212\274\117\061\136\243\360\326\366\247\306\023\251\111"
|
||||
"\201\141\211\016\075\032\134\032\053\212\045\011\061\156\242\041"
|
||||
"\252\054\336\371\136\075\235\116\024\224\366\333\247\237\044\051"
|
||||
"\001\256\070\076\311\224\130\365\037\176\376\121\355\240\162\227"
|
||||
"\315\121\221\053\216\056\172\243\302\161\176\152\020\243\223\022"
|
||||
"\122\313\121\034\140\252\021\177\050\017\320\025\260\103\254\176"
|
||||
"\224\075\251\043\154\044\306\056\225\105\230\246\350\054\271\072"
|
||||
"\370\012\126\130\264\147\330\334\167\251\362\047\355\237\245\201"
|
||||
"\334\117\245\110\164\154\167\012\261\020\260\231\075\151\323\065"
|
||||
"\164\052\215\050\221\146\005\010\017\367\060\374\226\326\176\163"
|
||||
"\045\043\274\232\220\064\244\101\104\124\332\202\276\256\267\063"
|
||||
"\330\105\133\152\253\140\163\272\127\243\267\356\172\065\141\237"
|
||||
"\131\035\071\351\121\336\053\226\062\001\274\136\064\173\013\367"
|
||||
"\240\163\111\332\006\143\304\010\250\201\241\124\105\221\330\106"
|
||||
"\016\163\175\026\202\137\075\077\174\056\153\031\377\306\325\340"
|
||||
"\127\272\221\034\340\006\230\252\141\020\004\317\211\046\157\057"
|
||||
"\126\376\001\171\372\154\136\005\305\167\053\022\332\223\205\153"
|
||||
"\200\202\166\001\313\325\006\303\370\300\362\150\245\024\165\212"
|
||||
"\131\162\252\174\363\273\156\231\037\176\204\326\301\256\001\060"
|
||||
"\273\266\222\242\373\347\317\154\200\341\317\005\101\166\343\163"
|
||||
"\276\000\321\267\314\375\260\323\304\243\264\141\017\350\206\110"
|
||||
"\314\043\156\132\224\113\225\307\205\011\323\031\327\355\207\375"
|
||||
"\121\310\252\101\173\316\213\356\011\167\271\017\356\377\334\155"
|
||||
"\314\160\142\164\262\160\027\071\115\376\015\052\251\047\031\167"
|
||||
"\073\277\246\066\312\304\107\366\262\107\065\255\214\121\234\027"
|
||||
"\234\144\144\372\323\331\310\165\171\027\223\263\162\172\227\001"
|
||||
"\143\355\102\036\372\077\011\245\042\265\371\350\224\311\233\127"
|
||||
"\104\134\260\117\232\130\335\375\303\117\155\013\343\340\015\311"
|
||||
"\107\266\137\233\006\332\250\223\116\350\132\135\014\053\156\044"
|
||||
"\356\171\146\343\107\100\074\116\135\372\025\121\273\007\313\273"
|
||||
"\337\215\030\321\105\342\066\313\355\001\305\205\342\277\300\037"
|
||||
"\333\145\341\343\315\153\242\033\035\045\076\222\130\222\362\254"
|
||||
"\211\270\035\021\153\105\022\263\104\134\263\267\377\271\037\045"
|
||||
"\346\033\236\157\213\115\255\025\346\164\132\242\112\341\116\323"
|
||||
"\104\072\251\173\067\135\126\103\031\376\247\131\177\034\124\121"
|
||||
"\231\016\046\300\337\070\175\150\222\112\204\224\274\275\200\362"
|
||||
"\100\005\171\070\315\046\336\333\201\377\365\204\047\351\171\120"
|
||||
"\161\103\241\045\366\224\135\356\061\121\223\370\336\233\113\153"
|
||||
"\061\123\103\150\270\033\273\007\305\020\352\111\264\325\001\223"
|
||||
"\013\370\001\020\311\266\064\366\336\172\170\324\114\152\332\264"
|
||||
"\336\151\366\231\352\303\064\325\041\002\337\134\123\363\222\015"
|
||||
"\270\172\304\073\361\100\116\135\262\251\351\257\116\254\367\010"
|
||||
"\212\202\016\206\145\317\174\307\347\146\322\110\351\366\012\145"
|
||||
"\164\044\126\076\070\321\115\207\377\156\202\031\144\144\142\027"
|
||||
"\051\306\171\370\334\047\063\073\222\037\235\126\026\034\170\027"
|
||||
"\061\036\021\273\047\222\056\136\260\366\322\175\025\072\116\101"
|
||||
"\177\116\032\174\274\303\152\010\027\130\341\320\331\221\350\343"
|
||||
"\266\135\001\030\302\074\033\236\337\332\042\052\217\061\066\354"
|
||||
"\255\055\344\147\054\342\137\274\031\067\327\314\105\146\070\146"
|
||||
"\251\057\013\232\161\226\263\142\352\302\345\347\207\173\003\057"
|
||||
"\174\373\224\112\060\057\160\020\060\211\041\302\106\342\055\266"
|
||||
"\041\055\251\363\222\117\367\235\177\340\372\076\135\214\105\220"
|
||||
"\121\320\344\030\134\054\110\070\061\334\066\215\245\077\104\335"
|
||||
"\176\240\360\111\270\075\346\266\321\167\150\344\106\030\316\325"
|
||||
"\141\125\033\355\036\253\361\041\257\314\274\221\073\066\341\220"
|
||||
"\333\070\133\305\224\065\267\220\201\035\327\164\304\366\364\132"
|
||||
"\263\142\334\050\140\071\237\230\277\317\146\324\270\170\311\254"
|
||||
"\215\343\125\021\337\161\343\276\334\156\156\165\254\165\275\253"
|
||||
"\273\174\375\172\133\374\222\024\213\055\242\031\170\241\175\220"
|
||||
"\222\041\322\144\165\003\154\261\044\246\255\066\000\264\051\204"
|
||||
"\314\077\275\133\104\242\365\276\031\173\023\206\144\335\031\210"
|
||||
"\260\125\263\135\000\330\124\163\103\026\177\336\166\005\174\170"
|
||||
"\244\203\076\064\323\347\316\057\057\327\123\157\230\035\326\232"
|
||||
"\111\221\211\224\344\241\367\256\146\132\331\174\177\174\037\172"
|
||||
"\144\313\371\231\303\032\002\351\265\253\245\110\335\116\262\252"
|
||||
"\223\004\253\152\301\272\201\275\270\000\030\372\340\355\261\157"
|
||||
"\111\315\321\035\345\140\253\332\154\224\367\033\256\313\247\146"
|
||||
"\253\106\001\322\144\370\312\013\130\065\303\261\056\173\317\171"
|
||||
"\045\171\263\223\241\021\151\003\217\144\201\152\174\154\334\015"
|
||||
"\202\321\140\217\024\271\311\075\321\063\102\372\166\050\013\100"
|
||||
"\320\274\227\023\354\125\105\031\353\014\164\221\047\124\043\234"
|
||||
"\055\214\020\350\137\155\300\036\256\104\252\145\300\236\344\203"
|
||||
"\142\022\053\371\074\153\104\305\201\121\330\261\155\064\050\237"
|
||||
"\037\041\346\321\134\351\355\163\272\176\157\140\037\026\125\053"
|
||||
"\110\210\045\222\211\154\020\161\333\244\077\372\214\062\203\204"
|
||||
"\107\343\237\010\333\031\002\140\000\301\137\364\365\271\021\240"
|
||||
"\217\271\146\060\267\314\206\132\051\131\353\000\222\053\234\115"
|
||||
"\355\000\314\227\220\357\127\042\356\263\046\036\031\014\314\113"
|
||||
"\234\350\306\103\360\162\206\200\341\314\016\210\366\036\373\046"
|
||||
"\067\077\063\271\355\214\174\040\336\100\046\125\206\300\167\023"
|
||||
"\377\302\036\107\201\233\307\201\175\137\105\012\121\237\154\166"
|
||||
"\224\031\305\223\167\177\322\053\252\030\163\214\171\025\307\111"
|
||||
"\177\150\071\071\257\170\361\330\115\337\246\117\066\020\260\013"
|
||||
"\061\131\140\300\067\246\303\061\164\244\276\343\200\120\112\124"
|
||||
"\030\204\166\340\360\114\146\226\101\242\150\133\205\071\350\237"
|
||||
"\214\120\157\007\005\010\030\135\166\220\015\175\156\234\204\214"
|
||||
"\306\177\072\274\102\100\316\015\023\330\051\113\221\132\261\321"
|
||||
"\332\306\252\051\043\357\174\222\132\025\130\103\154\274\123\167"
|
||||
"\274\150\013\024\321\122\120\262\075\200\147\377\242\343\202\162"
|
||||
"\026\073\350\350\037\057\215\377\013\260\343\346\104\255\011\206"
|
||||
"\232\032\273\012\071\344\204\132\001\331\147\267\154\277\200\360"
|
||||
"\321\215\040\266\276\022\254\211\317\117\221\051\112\036\057\367"
|
||||
"\043\340\213\007\033\326\140\071\076\043\215\043\325\317\322\340"
|
||||
"\035\062\343\107\150\352\175\067\276\174\013\135\241\041\134\342"
|
||||
"\312\354\153\123\017\036\211\332\134\264\231\232\355\022\277\021"
|
||||
"\124\310\001\362\175\336\072\155\334\057\176\003\027\071\134\147"
|
||||
"\302\122\331\236\107\204\012\306\310\362\157\323\242\102\001\346"
|
||||
"\226\021\355\214\220\131\212\151\115\311\307\353\011\363\130\053"
|
||||
"\053\117\356\073\217\350\350\256\312\366\216\277\053\036\077\126"
|
||||
"\101\140\236\101\236\165\065\266\137\261\325\253\075\276\115\055"
|
||||
"\340\240\227\360\176\335\147\266\077\135\100\233\250\344\264\234"
|
||||
"\247\004\072\017\353\315\340\213\375\214\025\306\225\161\076\121"
|
||||
"\111\110\241\366\023\316\030\147\266\144\206\233\322\136\304\230"
|
||||
"\250\341\142\356\210\341\274\332\171\215\104\072\312\265\157\252"
|
||||
"\235\321\143\017\074\157\000\160\231\325\144\104\122\330\063\134"
|
||||
"\356\333\111\322\221\245\037\337\124\132\321\257\224\215\226\133"
|
||||
"\047\074\051\375\313\366\276\115\252\341\316\076\334\270\162\322"
|
||||
"\361\115\344\331\215\013\002\332\234\121\331\056\027\037\354\044"
|
||||
"\222\266\202\131\210\257\173\211\320\174\253\200\143\147\022\015"
|
||||
"\060\367\116\354\241\243\303\200\274\130\217\100\011\270\156\234"
|
||||
"\204\374\203\072\334\225\310\005\011\057\205\135\166\022\250\156"
|
||||
"\267\241\207\237\372\311\261\175\301\145\117\151\063\253\130\133"
|
||||
"\272\155\321\113\333\341\204\377\337\121\063\232\217\272\214\376"
|
||||
"\333\176\347\357\131\121\355\015\141\345\126\165\123\156\105\222"
|
||||
"\317\206\010\316\035\031\300\171\126\327\221\067\336\366\102\043"
|
||||
"\277\226\027\065\152\157\221\261\157\151\035\153\031\350\327\341"
|
||||
"\152\314\121\062\031\247\174\101\056\227\312\160\230\062\325\357"
|
||||
"\252\032\152\147\111\056\300\057\320\371\351\020\156\300\171\335"
|
||||
"\103\030\312\326\045\166\164\026\247\004\214\357\212\176\160\166"
|
||||
"\043\012\021\302\236\337\036\221\351\122\156\151\342\375\212\146"
|
||||
"\246\311\075\256\231\220\332\013\033\143\342\124\074\206\317\110"
|
||||
"\200\023\202\026\311\055\001\121\103\070\101\313\003\105\254\165"
|
||||
"\031\262\171\207\264\213\311\055\307\205\263\343\203\246\125\047"
|
||||
"\343\044\253\341\336\174\142\005\004\154\364\001\240\303\232\140"
|
||||
"\036\335\124\011\051\350\207\040\133\112\370\233\303\225\065\047"
|
||||
"\327\105\223\276\277\143\046\044\077\356\007\121\116\247\261\010"
|
||||
"\075\161\060\112\222\003\002\146\035\347\364\341\166\346\015\327"
|
||||
"\001\235\140\221\353\062\315\300\335\202\000\375\163\325\125\176"
|
||||
"\355\165\152\107\071\234\235\004\101\176\327\245\116\235\210\260"
|
||||
"\333\263\106\347\253\147\371\127\027\146\341\250\245\151\214\243"
|
||||
"\355\261\141\054\150\261\225\256\144\000\373\325\305\260\033\101"
|
||||
"\233\101\042\340\004\356\237\240\051\036\211\232\375\263\073\174"
|
||||
"\301\047\132\375\070\134\250\213\143\127\247\246\334\073\003\032"
|
||||
"\142\171\243\106\220\346\106\060\214\335\057\025\110\153\323\267"
|
||||
"\307\377\373\215\364\220\320\267\315\350\147\171\374\106\251\170"
|
||||
"\374\314\077\241\363\324\240\371\250\235\221\232\377\317\262\343"
|
||||
"\144\005\031\361\264\320\045\214\025\200\367\300\340\152\173\070"
|
||||
"\016\063\046\210\151\210\050\302\246\142\254\370\100\327\217\163"
|
||||
"\335\250\145\221\170\212\036\216\012\025\117\353\200\312\044\217"
|
||||
"\375\113\027\146\323\100\051\172\242\326\162\343\256\001\126\214"
|
||||
"\251\274\036\042\106\074\260\121\122\377\075\323\312\141\142\310"
|
||||
"\254\172\057\200\272\131\372\135\057\155\101\336\156\230\152\030"
|
||||
"\124\210\073\233\305\353\355\030\353\052\353\266\214\116\177\071"
|
||||
"\310\256\271\203\007\264\341\067"
|
||||
#define lsto_z 1
|
||||
#define lsto ((&data[2834]))
|
||||
"\342"
|
||||
#define opts_z 1
|
||||
#define opts ((&data[2835]))
|
||||
"\274"
|
||||
#define tst2_z 19
|
||||
#define tst2 ((&data[2836]))
|
||||
"\336\142\207\373\012\000\172\246\303\040\137\300\262\323\167\203"
|
||||
"\130\253\276"/* End of data[] */;
|
||||
#define hide_z 4096
|
||||
#define SETUID 0 /* Define as 1 to call setuid(0) at start of script */
|
||||
#define DEBUGEXEC 0 /* Define as 1 to debug execvp calls */
|
||||
#define TRACEABLE 1 /* Define as 1 to enable ptrace the executable */
|
||||
#define HARDENING 0 /* Define as 1 to disable ptrace/dump the executable */
|
||||
#define BUSYBOXON 0 /* Define as 1 to enable work with busybox */
|
||||
|
||||
#if HARDENING
|
||||
static const char * shc_x[] = {
|
||||
"/*",
|
||||
" * Copyright 2019 - Intika <intika@librefox.org>",
|
||||
" * Replace ******** with secret read from fd 21",
|
||||
" * Also change arguments location of sub commands (sh script commands)",
|
||||
" * gcc -Wall -fpic -shared -o shc_secret.so shc_secret.c -ldl",
|
||||
" */",
|
||||
"",
|
||||
"#define _GNU_SOURCE /* needed to get RTLD_NEXT defined in dlfcn.h */",
|
||||
"#define PLACEHOLDER \"********\"",
|
||||
"#include <dlfcn.h>",
|
||||
"#include <stdlib.h>",
|
||||
"#include <string.h>",
|
||||
"#include <unistd.h>",
|
||||
"#include <stdio.h>",
|
||||
"#include <signal.h>",
|
||||
"",
|
||||
"static char secret[128000]; //max size",
|
||||
"typedef int (*pfi)(int, char **, char **);",
|
||||
"static pfi real_main;",
|
||||
"",
|
||||
"// copy argv to new location",
|
||||
"char **copyargs(int argc, char** argv){",
|
||||
" char **newargv = malloc((argc+1)*sizeof(*argv));",
|
||||
" char *from,*to;",
|
||||
" int i,len;",
|
||||
"",
|
||||
" for(i = 0; i<argc; i++){",
|
||||
" from = argv[i];",
|
||||
" len = strlen(from)+1;",
|
||||
" to = malloc(len);",
|
||||
" memcpy(to,from,len);",
|
||||
" // zap old argv space",
|
||||
" memset(from,'\\0',len);",
|
||||
" newargv[i] = to;",
|
||||
" argv[i] = 0;",
|
||||
" }",
|
||||
" newargv[argc] = 0;",
|
||||
" return newargv;",
|
||||
"}",
|
||||
"",
|
||||
"static int mymain(int argc, char** argv, char** env) {",
|
||||
" //fprintf(stderr, \"Inject main argc = %d\\n\", argc);",
|
||||
" return real_main(argc, copyargs(argc,argv), env);",
|
||||
"}",
|
||||
"",
|
||||
"int __libc_start_main(int (*main) (int, char**, char**),",
|
||||
" int argc,",
|
||||
" char **argv,",
|
||||
" void (*init) (void),",
|
||||
" void (*fini)(void),",
|
||||
" void (*rtld_fini)(void),",
|
||||
" void (*stack_end)){",
|
||||
" static int (*real___libc_start_main)() = NULL;",
|
||||
" int n;",
|
||||
"",
|
||||
" if (!real___libc_start_main) {",
|
||||
" real___libc_start_main = dlsym(RTLD_NEXT, \"__libc_start_main\");",
|
||||
" if (!real___libc_start_main) abort();",
|
||||
" }",
|
||||
"",
|
||||
" n = read(21, secret, sizeof(secret));",
|
||||
" if (n > 0) {",
|
||||
" int i;",
|
||||
"",
|
||||
" if (secret[n - 1] == '\\n') secret[--n] = '\\0';",
|
||||
" for (i = 1; i < argc; i++)",
|
||||
" if (strcmp(argv[i], PLACEHOLDER) == 0)",
|
||||
" argv[i] = secret;",
|
||||
" }",
|
||||
"",
|
||||
" real_main = main;",
|
||||
"",
|
||||
" return real___libc_start_main(mymain, argc, argv, init, fini, rtld_fini, stack_end);",
|
||||
"}",
|
||||
"",
|
||||
0};
|
||||
#endif /* HARDENING */
|
||||
|
||||
/* rtc.c */
|
||||
|
||||
#include <sys/stat.h>
|
||||
@ -314,6 +377,156 @@ void arc4(void * str, int len)
|
||||
|
||||
/* End of ARC4 */
|
||||
|
||||
#if HARDENING
|
||||
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include <sys/prctl.h>
|
||||
#define PR_SET_PTRACER 0x59616d61
|
||||
|
||||
/* Seccomp Sandboxing Init */
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <linux/filter.h>
|
||||
#include <linux/seccomp.h>
|
||||
#include <linux/audit.h>
|
||||
|
||||
#define ArchField offsetof(struct seccomp_data, arch)
|
||||
|
||||
#define Allow(syscall) \
|
||||
BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, SYS_##syscall, 0, 1), \
|
||||
BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW)
|
||||
|
||||
struct sock_filter filter[] = {
|
||||
/* validate arch */
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, ArchField),
|
||||
BPF_JUMP( BPF_JMP+BPF_JEQ+BPF_K, AUDIT_ARCH_X86_64, 1, 0),
|
||||
BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL),
|
||||
|
||||
/* load syscall */
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, offsetof(struct seccomp_data, nr)),
|
||||
|
||||
/* list of allowed syscalls */
|
||||
Allow(exit_group), /* exits a process */
|
||||
Allow(brk), /* for malloc(), inside libc */
|
||||
Allow(mmap), /* also for malloc() */
|
||||
Allow(munmap), /* for free(), inside libc */
|
||||
|
||||
/* and if we don't match above, die */
|
||||
BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL),
|
||||
};
|
||||
struct sock_fprog filterprog = {
|
||||
.len = sizeof(filter)/sizeof(filter[0]),
|
||||
.filter = filter
|
||||
};
|
||||
|
||||
/* Seccomp Sandboxing - Set up the restricted environment */
|
||||
void seccomp_hardening() {
|
||||
if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) {
|
||||
perror("Could not start seccomp:");
|
||||
exit(1);
|
||||
}
|
||||
if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &filterprog) == -1) {
|
||||
perror("Could not start seccomp:");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
/* End Seccomp Sandboxing Init */
|
||||
|
||||
void shc_x_file() {
|
||||
FILE *fp;
|
||||
int line = 0;
|
||||
|
||||
if ((fp = fopen("/tmp/shc_x.c", "w")) == NULL ) {exit(1); exit(1);}
|
||||
for (line = 0; shc_x[line]; line++) fprintf(fp, "%s\n", shc_x[line]);
|
||||
fflush(fp);fclose(fp);
|
||||
}
|
||||
|
||||
int make() {
|
||||
char * cc, * cflags, * ldflags;
|
||||
char cmd[4096];
|
||||
|
||||
cc = getenv("CC");
|
||||
if (!cc) cc = "cc";
|
||||
|
||||
sprintf(cmd, "%s %s -o %s %s", cc, "-Wall -fpic -shared", "/tmp/shc_x.so", "/tmp/shc_x.c -ldl");
|
||||
if (system(cmd)) {remove("/tmp/shc_x.c"); return -1;}
|
||||
remove("/tmp/shc_x.c"); return 0;
|
||||
}
|
||||
|
||||
void arc4_hardrun(void * str, int len) {
|
||||
//Decode locally
|
||||
char tmp2[len];
|
||||
char tmp3[len+1024];
|
||||
memcpy(tmp2, str, len);
|
||||
|
||||
unsigned char tmp, * ptr = (unsigned char *)tmp2;
|
||||
int lentmp = len;
|
||||
int pid, status;
|
||||
pid = fork();
|
||||
|
||||
shc_x_file();
|
||||
if (make()) {exit(1);}
|
||||
|
||||
setenv("LD_PRELOAD","/tmp/shc_x.so",1);
|
||||
|
||||
if(pid==0) {
|
||||
|
||||
//Start tracing to protect from dump & trace
|
||||
if (ptrace(PTRACE_TRACEME, 0, 0, 0) < 0) {
|
||||
kill(getpid(), SIGKILL);
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
//Decode Bash
|
||||
while (len > 0) {
|
||||
indx++;
|
||||
tmp = stte[indx];
|
||||
jndx += tmp;
|
||||
stte[indx] = stte[jndx];
|
||||
stte[jndx] = tmp;
|
||||
tmp += stte[indx];
|
||||
*ptr ^= stte[tmp];
|
||||
ptr++;
|
||||
len--;
|
||||
}
|
||||
|
||||
//Do the magic
|
||||
sprintf(tmp3, "%s %s", "'********' 21<<<", tmp2);
|
||||
|
||||
//Exec bash script //fork execl with 'sh -c'
|
||||
system(tmp2);
|
||||
|
||||
//Empty script variable
|
||||
memcpy(tmp2, str, lentmp);
|
||||
|
||||
//Clean temp
|
||||
remove("/tmp/shc_x.so");
|
||||
|
||||
//Sinal to detach ptrace
|
||||
ptrace(PTRACE_DETACH, 0, 0, 0);
|
||||
exit(0);
|
||||
}
|
||||
else {wait(&status);}
|
||||
|
||||
/* Seccomp Sandboxing - Start */
|
||||
seccomp_hardening();
|
||||
|
||||
exit(0);
|
||||
}
|
||||
#endif /* HARDENING */
|
||||
|
||||
/*
|
||||
* Key with file invariants.
|
||||
*/
|
||||
@ -400,6 +613,54 @@ int chkenv(int argc)
|
||||
|
||||
void chkenv_end(void){}
|
||||
|
||||
#if HARDENING
|
||||
|
||||
static void gets_process_name(const pid_t pid, char * name) {
|
||||
char procfile[BUFSIZ];
|
||||
sprintf(procfile, "/proc/%d/cmdline", pid);
|
||||
FILE* f = fopen(procfile, "r");
|
||||
if (f) {
|
||||
size_t size;
|
||||
size = fread(name, sizeof (char), sizeof (procfile), f);
|
||||
if (size > 0) {
|
||||
if ('\n' == name[size - 1])
|
||||
name[size - 1] = '\0';
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
|
||||
void hardening() {
|
||||
prctl(PR_SET_DUMPABLE, 0);
|
||||
prctl(PR_SET_PTRACER, -1);
|
||||
|
||||
int pid = getppid();
|
||||
char name[256] = {0};
|
||||
gets_process_name(pid, name);
|
||||
|
||||
if ( (strcmp(name, "bash") != 0)
|
||||
&& (strcmp(name, "/bin/bash") != 0)
|
||||
&& (strcmp(name, "sh") != 0)
|
||||
&& (strcmp(name, "/bin/sh") != 0)
|
||||
&& (strcmp(name, "sudo") != 0)
|
||||
&& (strcmp(name, "/bin/sudo") != 0)
|
||||
&& (strcmp(name, "/usr/bin/sudo") != 0)
|
||||
&& (strcmp(name, "gksudo") != 0)
|
||||
&& (strcmp(name, "/bin/gksudo") != 0)
|
||||
&& (strcmp(name, "/usr/bin/gksudo") != 0)
|
||||
&& (strcmp(name, "kdesu") != 0)
|
||||
&& (strcmp(name, "/bin/kdesu") != 0)
|
||||
&& (strcmp(name, "/usr/bin/kdesu") != 0)
|
||||
)
|
||||
{
|
||||
printf("Operation not permitted\n");
|
||||
kill(getpid(), SIGKILL);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* HARDENING */
|
||||
|
||||
#if !TRACEABLE
|
||||
|
||||
#define _LINUX_SOURCE_COMPAT
|
||||
@ -411,9 +672,14 @@ void chkenv_end(void){}
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if !defined(PTRACE_ATTACH) && defined(PT_ATTACH)
|
||||
# define PTRACE_ATTACH PT_ATTACH
|
||||
#if !defined(PT_ATTACHEXC) /* New replacement for PT_ATTACH */
|
||||
#if !defined(PTRACE_ATTACH) && defined(PT_ATTACH)
|
||||
#define PT_ATTACHEXC PT_ATTACH
|
||||
#elif defined(PTRACE_ATTACH)
|
||||
#define PT_ATTACHEXC PTRACE_ATTACH
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void untraceable(char * argv0)
|
||||
{
|
||||
char proc[80];
|
||||
@ -431,7 +697,7 @@ void untraceable(char * argv0)
|
||||
close(0);
|
||||
mine = !open(proc, O_RDWR|O_EXCL);
|
||||
if (!mine && errno != EBUSY)
|
||||
mine = !ptrace(PTRACE_ATTACH, pid, 0, 0);
|
||||
mine = !ptrace(PT_ATTACHEXC, pid, 0, 0);
|
||||
if (mine) {
|
||||
kill(pid, SIGCONT);
|
||||
} else {
|
||||
@ -486,6 +752,12 @@ char * xsh(int argc, char ** argv)
|
||||
if (!rlax[0] && key_with_file(shll))
|
||||
return shll;
|
||||
arc4(opts, opts_z);
|
||||
#if HARDENING
|
||||
arc4_hardrun(text, text_z);
|
||||
exit(0);
|
||||
/* Seccomp Sandboxing - Start */
|
||||
seccomp_hardening();
|
||||
#endif
|
||||
arc4(text, text_z);
|
||||
arc4(tst2, tst2_z);
|
||||
key(tst2, tst2_z);
|
||||
@ -535,9 +807,15 @@ char * xsh(int argc, char ** argv)
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
#if SETUID
|
||||
setuid(0);
|
||||
#endif
|
||||
#if DEBUGEXEC
|
||||
debugexec("main", argc, argv);
|
||||
#endif
|
||||
#if HARDENING
|
||||
hardening();
|
||||
#endif
|
||||
#if !TRACEABLE
|
||||
untraceable(argv[0]);
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user