吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 24523|回复: 19
收起左侧

[Android 原创] 陆金所自动抢标,简单实现。希望各位大大给出更好的方案。

  [复制链接]
xuyuahui001 发表于 2017-12-16 23:05
本帖最后由 xuyuahui001 于 2017-12-16 23:12 编辑

怎么从有道云笔记markdown发到论坛里面啊。。格式老是乱。。只能复制到word了。。

0、效果
由于水平所限,无法破解梆梆加固导致无法静态分析,无法动态调试。
无法抓https包,解包。

希望各位大大给出更好的方案。

所以笨方法实现的效果是:
    1、通过http请求网页,获取关键的productId sid
    2、通过hook自动点击按钮,跳转到付款界面。
    3、自动付款。
    4、由于界面跳转比较耗时,所以大概需要3秒完成。
一、背景
闲钱基本都放陆金所买稳赢安E了,但是现在二手安E基本抢不到。网上也没有卖秒杀器的。所以想自己做一个。
二、调查
a) 陆金所最新版本采用了梆梆加固。


b) 大部分请求采用https。
三、方案
采用xposed hook,追踪代码。
四、具体实现
1、首先hook Application的onCreate 主要获取ClassLoader
    ```
    "com.secneo.apkwrapper.ApplicationWrapper", "onCreate",
    ```
2、通过ClassLoader hook所有Activity Fragmen Button,方便跟踪逻辑。

3、通过Hook的Activity可以看到,service.lufax.common.RootControllerActivity为项目详情页,传递过来的参数为
    Intent { cmp=com.lufax.android/service.lufax.common.RootControllerActivity (has extras) } Extras=Bundle[{h5params=, subProductCategory=, isOnlineH5=true, productCategory=R01, title_style_white=true, from=list, productId=***, productType=LOAN_REQUEST, backTag=null, LAST_PAGE_DATA={"webUrl":"***","lastPageData":{"h5params":"","iconTag":"","from":"list","salesArea":"","productCategory":"R01","productId":"***"},"naviBarTitle":"项目详情","alias":"financeDetail","refreshType":"1","localParams":"userInfo","webViewLoadType":"1"}, fragment_instace=service.lufax.controller.LufaxRootViewController, key_ui_plugin=class com.lufax.android.v2.app.h5.taskplugin.FinanceDetailCompatibleH5UiPlugin}]

4、com.lufax.android.v2.app.finance.invest.InvestBaseActivity为投资详情页,传递过来的参数:
    Intent { cmp=com.lufax.android/.v2.app.finance.invest.InvestBaseActivity (has extras) } Extras=Bundle[{sid=****, fragment_instace=com.lufax.android.v2.app.finance.invest.confirm.InvestConfirmFragment, preInvestNotifyUrl=null, investModel=InvestModel{tradeChannel='2', productCategory='R01', salesArea='', productId='****', amount='**.8', from='list', insuranceFeeFlag='', subProductCategory='', productCode='', productType='LOAN_REQUEST', bidFee='', backTag='', h5params=''}}]

5、com.lufax.android/.v2.app.finance.invest.pay.InvestPayActivity为投资付款确认页,传递的参数:
    Intent { cmp=com.lufax.android/.v2.app.finance.invest.pay.InvestPayActivity (has extras) } Extras=Bundle[{payAmount=6,756.80, sid=***, coinString=***, coins=[***], investModel=InvestModel{tradeChannel='2', productCategory='R01', salesArea='', productId='***', amount='6756.8', from='list', insuranceFeeFlag='', subProductCategory='', productCode='', productType='LOAN_REQUEST', bidFee='', backTag='', h5params=''}, externalInfo=, addressData=null, fragment_instace=com.lufax.android.v2.app.finance.invest.pay.InvestPayFragment, productName=稳盈-***}]

6、通过界面启动的跟踪,可以发现,我们只要有了productId sid 就可以直接启动InvestBaseActivity。

由于加固无法分析,InvestPayActivity需要的coinString和coins是如何生存的,所以不能直接启动InvestPayActivity

productId可以通过http请求网页https://list.lu.com/list/transfer-p2p解析后直接获得。
sid,通过网页的Debug跟踪,发现可以通过请求https://secmkt.lu.com/secmkt/service/investment/v1/invest-check获取。

启动InvestBaseActivity后通过hook OnResume方法,直接自动点击按钮 跳入InvestPayActivity界面。


7、进入到InvestPayActivity界面,通过Hook Button跟踪到两个关键的按钮,自动点击就可以了。

8、自动输入密码

final Class BasicEditItem = XposedHelpers.findClass("com.lufax.android.ui.BasicEditItem", cl);

        XposedHelpers.findAndHookMethod(BasicEditItem, "b",int.class,new XC_MethodHook(){
                @Override
                protected void afterHookedMethod(MethodHookParam param)
                                throws Throwable {
                        super.afterHookedMethod(param);
                        LinearLayout item = (LinearLayout) param.thisObject;

                        String csName = param.thisObject.getClass().getName();
                        if(csName.contains("BasicEditPasswordItem")){
                                EditText edit = (EditText)
                                edit.setText("****");


                        }

                }
        });






9、hook所有按钮 方便逻辑跟踪
XposedHelpers.findAndHookMethod(View.class, "setOnClickListener",OnClickListener.class,new XC_MethodHook(){
                @Override
                protected void afterHookedMethod(MethodHookParam param)
                                throws Throwable {
                        super.afterHookedMethod(param);
                        if(param.thisObject instanceof Button){
                                Button bt = (Button) param.thisObject;
                                int id = bt.getId();
                                if(2131692405 == id){  //投资付款界面的下一步按钮
                                        mHandler.removeMessages(0);
                                        mHandler.sendEmptyMessageDelayed(0, 10);
                                        mHandButton = bt;

                                }else if(id == 2131690401){//投资付款界面的立即投资按钮
                                        mHandler.removeMessages(0);
                                        mHandler.removeMessages(1);
                                        mHandler.sendEmptyMessageDelayed(0, 10);
                                        mHandler.sendEmptyMessageDelayed(1, 10000);
                                        mHandButton = bt;
                                }
                        }

                }

        10、陆金所 大部分Acitivity继承此类        
        final Class LufaxBaseActivityV2 = XposedHelpers.findClass("com.lufax.android.v2.base.component.LufaxBaseActivityV2", cl);

        XposedHelpers.findAndHookMethod(LufaxBaseActivityV2, "onCreate",Bundle.class,new XC_MethodHook(){
                                        @Override
                                        protected void afterHookedMethod(MethodHookParam param)
                                                        throws Throwable {
                                                super.afterHookedMethod(param);
                                                LOG.d("onCreate:"+param.thisObject.getClass().toString());
                                                Activity act = (Activity) param.thisObject;

                                                if(act.getClass().getName().contains("InvestBaseActivity")// 投资确认界面
                                                                ||act.getClass().getName().contains("RootControllerActivity")//投资信息界面
                                                                ||act.getClass().getName().contains("InvestPayActivity")//投资付款界面
                                                                ){
                                                        if(act.getClass().getName().contains("InvestPayActivity")){
                                                                mInvestPayActivity = act;
                                                        }

                                                    //输出界面启动传递的参数信息。
                                                    if(act.getClass().getName().contains("InvestBaseActivity")){
                                                                mInvestBaseActivity = act;
                                                        }
                                                        Intent it = act.getIntent();
                                                        LOG.d("it="+it + " Extras="+it.getExtras());
                                                        if(param.args[0] != null){
                                                                Bundle b = (Bundle) param.args[0];
                                                                LOG.d("b="+b);

                                                        }
                                                }

                                        }
                                });

免费评分

参与人数 4吾爱币 +14 热心值 +4 收起 理由
wensensen + 1 谢谢@Thanks!
abel_xu + 1 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!
qtfreet00 + 12 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!
(ˉ(∞)ˉ)zZ + 1 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

easysoho 发表于 2018-2-13 21:24
表示看不懂,不能作成成品吗
 楼主| xuyuahui001 发表于 2018-1-13 22:02
bandhzh 发表于 2018-1-13 21:50
我最近也在研究陆金所, 稍微看了下 ,手机端最后是不是又调用回类似webView访问网页端啊

一些节目是html的。。
kk1212 发表于 2017-12-16 23:15
leonwqhb 发表于 2017-12-16 23:39

支持你
楼主厉害了
Xuanze11111 发表于 2017-12-16 23:56 来自手机
这么牛逼
yong2050 发表于 2017-12-17 00:17
厉害的无以伦比了
 楼主| xuyuahui001 发表于 2017-12-17 09:40
如果谁能帮忙提取出陆金所加固的代码,或者怎么抓HTTPS的包,就能达到更好的效果。
bandhzh 发表于 2018-1-13 21:50
我最近也在研究陆金所, 稍微看了下 ,手机端最后是不是又调用回类似webView访问网页端啊
 楼主| xuyuahui001 发表于 2018-1-15 19:43
bandhzh 发表于 2018-1-15 18:50
我最近也在摸索陆金所的
方便加下QQ 我们一起讨论下
763518276

有什么进展直接在论坛说吧。。。
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-4-20 13:36

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表