Jump to content

how to decode base64 php code


Recommended Posts

I downloaded a script and now it's using 100% of my server's resources. I believe the script has malicious code but I am unable to decode it to see. Can someone please explain to me how to view the source code?

 

The first part of the script is:

<?php /*  */$OOO000000=urldecode('%66%67%36%73%62%65%68%70%72%61%34%63%6f%5f%74%6e%64');$OOO0000O0=$OOO000000{4}.$OOO000000{9}.$OOO000000{3}.$OOO000000{5};$OOO0000O0.=$OOO000000{2}.$OOO000000{10}.$OOO000000{13}.$OOO000000{16};$OOO0000O0.=$OOO0000O0{3}.$OOO000000{11}.$OOO000000{12}.$OOO0000O0{7}.$OOO000000{5};$OOO000O00=$OOO000000{0}.$OOO000000{12}.$OOO000000{7}.$OOO000000{5}.$OOO000000{15};$O0O000O00=$OOO000000{0}.$OOO000000{1}.$OOO000000{5}.$OOO000000{14};$O0O000O0O=$O0O000O00.$OOO000000{11};$O0O000O00=$O0O000O00.$OOO000000{3};$O0O00OO00=$OOO000000{0}.$OOO000000{8}.$OOO000000{5}.$OOO000000{9}.$OOO000000{16};$OOO00000O=$OOO000000{3}.$OOO000000{14}.$OOO000000{8}.$OOO000000{14}.$OOO000000{8};$OOO0O0O00=__FILE__;$OO00O0000=0x39c;

 

Part 2:

eval($OOO0000O0('JE8wMDBPME8wMD0kT09PMDAwTzAwKCRPT08wTzBPMDAsJ3JiJyk7JE8wTzAwT08wMCgkTzAwME8wTzAwLDB4NDg5KTskT08wME8wME8wPSRPT08wMDAwTzAoJE9PTzAwMDAwTygkTzBPMDBPTzAwKCRPMDAwTzBPMDAsMHgxN2MpLCdONDFqOFRDYkxER0U5d1owMldpK01uczdWa3hyeVBJSllYUXV0bWRBUlMvMzVxaFVIcGc2ZnpGQmNPbHZlYW9LPScsJ0FCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5Ky8nKSk7ZXZhbCgkT08wME8wME8wKTs='));return;?>

 

Last Part:

flkje~EnhJbS~rkD8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Pbtq0dT6yFmArQYAxCaqknaHVsPmDgHtxCaqknaHVsPmG+5GDbwqV7DfIifoV7w6xsPhG1PtV7Wm7BmmV7LAECWXPCMRLmtQGitv1QW6rsTgPbtq0dT6yFmArQYAyFXUybSSrCpX7BWgVsw3xsOADgHtyFXUybSSrCpX7BWgVsw3xsOAG+5GDbwqV7DfIifokCm6yCpXIiYAxsOtk7YhPb45Dgtv1Y==srg^bL]qNZ|xKoYHhm

Link to comment
Share on other sites

This is one of the files unedited:

<?php /*  */$OOO000000=urldecode('%66%67%36%73%62%65%68%70%72%61%34%63%6f%5f%74%6e%64');$OOO0000O0=$OOO000000{4}.$OOO000000{9}.$OOO000000{3}.$OOO000000{5};$OOO0000O0.=$OOO000000{2}.$OOO000000{10}.$OOO000000{13}.$OOO000000{16};$OOO0000O0.=$OOO0000O0{3}.$OOO000000{11}.$OOO000000{12}.$OOO0000O0{7}.$OOO000000{5};$OOO000O00=$OOO000000{0}.$OOO000000{12}.$OOO000000{7}.$OOO000000{5}.$OOO000000{15};$O0O000O00=$OOO000000{0}.$OOO000000{1}.$OOO000000{5}.$OOO000000{14};$O0O000O0O=$O0O000O00.$OOO000000{11};$O0O000O00=$O0O000O00.$OOO000000{3};$O0O00OO00=$OOO000000{0}.$OOO000000{8}.$OOO000000{5}.$OOO000000{9}.$OOO000000{16};$OOO00000O=$OOO000000{3}.$OOO000000{14}.$OOO000000{8}.$OOO000000{14}.$OOO000000{8};$OOO0O0O00=__FILE__;$OO00O0000=0x39c;eval($OOO0000O0('JE8wMDBPME8wMD0kT09PMDAwTzAwKCRPT08wTzBPMDAsJ3JiJyk7JE8wTzAwT08wMCgkTzAwME8wTzAwLDB4NDg5KTskT08wME8wME8wPSRPT08wMDAwTzAoJE9PTzAwMDAwTygkTzBPMDBPTzAwKCRPMDAwTzBPMDAsMHgxN2MpLCdONDFqOFRDYkxER0U5d1owMldpK01uczdWa3hyeVBJSllYUXV0bWRBUlMvMzVxaFVIcGc2ZnpGQmNPbHZlY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1PhV7kmkFTfxsahDgHtrdTFksPXPCmUrQtv1QW6rsTgPbtq0dT6yFmArQYAkCaqVsmh7Bngr1y5DCWUrsTSrmazydHSZHRtyFzXyAWOE+OXyBwSkFcRDFWUrsTSrQy5DCWUrsTSrQtv1QW6rsTgPbtq0dT6yFmArQYAxCaqknaHVsPmDgHtxCaqknaHVsPmG+5GDbwqV7DfIifoV7w6xsPhG1PtV7Wm7BmmV7LAECWXPCMRLmtQGitv1QW6rsTgPbtq0dT6yFmArQYAyFXUybSSrCpX7BWgVsw3xsOADgHtyFXUybSSrCpX7BWgVsw3xsOAG+5GDbwqV7DfIifokCm6yCpXIiYAxsOtk7YhPb45Dgtv1Y==srg^bL]qNZ|xKoYHhm

 

 

If I take the middle code and decode it:

highlight_string(base64_decode('JE8wMDBPME8wMD0kT09PMDAwTzAwKCRPT08wTzBPMDAsJ3JiJyk7JE8wTzAwT08wMCgkTzAwME8wTzAwLDB4NDdkKTskT08wME8wME8wPSRPT08wMDAwTzAoJE9PTzAwMDAwTygkTzBPMDBPTzAwKCRPMDAwTzBPMDAsMHgxN2MpLCdONDFqOFRDYkxER0U5d1owMldpK01uczdWa3hyeVBJSllYUXV0bWRBUlMvMzVxaFVIcGc2ZnpGQmNPbHZlYW9LPScsJ0FCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5Ky8nKSk7ZXZhbCgkT08wME8wME8wKTs='));

 

It displays this:

$O000O0O00=$OOO000O00($OOO0O0O00,'rb');$O0O00OO00($O000O0O00,0x47d);$OO00O00O0=$OOO0000O0($OOO00000O($O0O00OO00($O000O0O00,0x17c),'N41j8TCbLDGE9wZ02Wi+Mns7VkxryPIJYXQutmdARS/35qhUHpg6fzFBcOlveaoK=','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'));eval($OO00O00O0);

 

But that's as far as I've been able to go.

Link to comment
Share on other sites

  • 2 months later...

that's my decrypted output

<?php

include("inc/application_top.php");
$navegation = '';
$smarty->assign('website_title',$website_title);
$smarty->assign('website_keyword',$website_keyword);
$smarty->assign('website_description',$website_description);
$smarty->assign('title_header1',$title_header1);
$smarty->assign('title_header2',$title_header2);
$smarty->assign('navegation',$navegation);
$smarty->assign('date',date("F d, Y"));
$smarty->assign('navegation',$navegation);
$smarty->assign('domain_url',$domain_url);
$smarty->assign('domain',$domain);
$smarty->assign('home_page',$home_page);
$smarty->assign('date_year',date("Y"));
$smarty->assign('shopzilla_tracking',$shopzilla_tracking);
$smarty->display('index.tpl');

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.