没有什么太大技术含量的东西,直接发出来吧,测试效果不是很大,但是聊胜于无(反正不要钱)。
反编译文件可以得到请求的验证服务器地址,由于wget时带上了-no-check-certificate(网络验证不验证服务端身份,跟没有有什么区别),所以可以直接改host指向伪造的服务器,通过查看请求包和返回包,分析写出以下代码作为服务端。
<?php error_reporting(0); @$act = $_POST['slm_action']; @$key = $_POST['license_key']; $date = date("Y-m-d"); if(isset($act) && trim($act) != ''){ if($act == 'slm_check'){ if(ctype_alnum($key)){ if($code = file_get_contents($key.'.txt')){ $codes = explode(',',$code); if(count($codes) >= 5){ header("Content-Type: Application/json"); echo '{"result":"error","message":"Invalid license key"}'; die; } $registered_domains = array(); foreach($codes as $scode){ if(trim($scode) != ''){ $registered_domains[] = array( 'id'=>mt_rand(1,3000), 'lic_key_id'=>mt_rand(1,3000), 'lic_key'=>$key, 'registered_domain'=>$scode, 'item_reference'=>'' ); } } $return = array( 'result'=>'success', 'message'=>'License key details retrieved.', 'status'=>'active', 'max_allowed_domains'=>'4', 'email'=>'noemail@mail.com', 'registered_domains'=>$registered_domains, 'bandwidth'=>'65500M', 'duration'=>'Immaterial and Missing Power', 'server_date'=>$date, 'activate_date'=>'2016-02-20', 'expire_date'=>'2038-01-18' ); header("Content-Type: Application/json"); echo json_encode($return); die; }else{ $return = array( 'result'=>'success', 'message'=>'License key details retrieved.', 'status'=>'active', 'max_allowed_domains'=>'4', 'email'=>'noemail@mail.com', 'registered_domains'=>array(), 'bandwidth'=>'65500M', 'duration'=>'Immaterial and Missing Power', 'server_date'=>$date, 'activate_date'=>'2016-02-20', 'expire_date'=>'2038-01-18' ); header("Content-Type: Application/json"); echo json_encode($return); die; } }else{ header("Content-Type: Application/json"); echo '{"result":"error","message":"Invalid license key"}'; die; } }elseif($act == 'slm_activate'){ @$code = $_POST['registered_domain']; if(ctype_alnum($key)){ if(trim($code) != ''){ if($data = file_get_contents($key.'.txt')){ if(count(explode(',',$data)) >= 5){ header("Content-Type: Application/json"); echo '{"result":"error","message":"Invalid license key"}'; die; } } file_put_contents($key.'.txt',$code.',',FILE_APPEND); header("Content-Type: Application/json"); echo '{"result":"success","message":"License key activated"}'; die; }else{ header("Content-Type: Application/json"); echo '{"result":"error","message":"Verification API secret key is invalid"}'; die; } }else{ header("Content-Type: Application/json"); echo '{"result":"error","message":"Invalid license key"}'; die; } } }
程序完全模仿服务端,会把程序提交的机器码写入文件储存,查询时会返回,由于发现1个序列号只能对应4台机器,所以前面做了判断。
(虽然后来发现其实根本不用这么麻烦,直接输出第一次查询的结果,不用记录机器码)
大概就是这样了,将该文件存为index.php,创建一个网站并开启https(自签名证书即可),然后绑定license.cloudtalkers.com域名,要安装的机器改host到自己的伪造服务器上之后按照官方的安装程序,序列号随便任何字母数字组合即可。