91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代寫Lab05  InsecureBankv2 01程序
代寫Lab05  InsecureBankv2 01程序

時間:2025-10-22  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯


Lab05 
InsecureBankv2 01



Module Code & Title:           
Programme Code & Title:
Instructor:         
Student Name:         
Student Number:


Lab Time: dd/mm/yyyy



PLEASE BE AWARE: Do not try this lab on your personal phone. If a personal Android device is used, make a backup of the data on device.

Note: You need to submit a detailed lab report, with screenshots, to describe what you have done and what you have observed. You also need to provide explanations for the observations that are interesting or surprising. Finally, answer all questions in the lab instructions if there are any.

Task 0, Install drozer
drozer (formerly Mercury) is the leading security testing framework for Android. The website is 
https://github.com/WithSecureLabs/drozer

Option 1, install latest drozer
Follow the instructions, install it with pip
pipx install drozer

Option 2, install drozer 2.4
The latest version of drozer supports python3.x. An older version is for python 2.x. If you only have Python 2.x, please install drozer 2.4. 
Download drozer-2.4.4.win32.msi and save it in the python27 folder. Ignore the warning message. 
Go to Windows Security  Virus & threat protection, and under Virus & threat protection settings select Manage settings. Switch Real-time protection to Off. 
Double click msi to install it. When asking for python version, choose the python27.

There are two options to run drozer with python2 instead of python3:
Option 1, each time before running drozer type (use your own path for python27):
set path=C:\Python27;C:\Python27\Scripts;%path%

option 2, open drozer.bat under the directory C:\Python27\Scripts, replace python.exe to C:\python27\python.exe

Back to the cmd, navigate to C:\Python27\Scripts, type:
drozer
We should see some information. Type:
drozer console connect
We should find an error.
Install libraries.
python -m pip install service_identity

After successfully installing drozer on the PC, install drozer.apk in the Android device.
download drozer.apk from 
https://labs.withsecure.com/tools/drozer
select drozer (Agent .apk only)

Open Android Studio, turn on a device. Drag the apk to the device to install it. Do not use a higher version of Android. Drozer does not support it.

Open the Drozer in the device.

Task 1, install InsecureBankv2 and tools
Step 1, install python 2.7.x.
Download and install it.
Assuming that your Python installation is in C:\Python27\, add this to your PATH: C:\Python27\;C:\Python27\Scripts\

Step 2, install pip if you have not installed it.
In the CMD, try pip
pip -help
If it returns an error, navigate to the python directory, type:
python -m ensurepip --upgrade
run:
python -m pip install protobuf
python -m pip install pyopenssl
python -m pip install twisted

Step 3
InsecureBank is a purposely vulnerable app designed for educational purposes. It has a server and an apk.
https://github.com/dineshshetty/Android-InsecureBankv2
We need to launch the server so that the vulnerable app can connect to it, and we can start reversing.

Download InsecureBankv2.apk.  Install it in virtual device. If it says the SDK version is lower, try this:
.\adb install --bypass-low-target-sdk-block InsecureBankv2.apk
Please use your own path for InsecureBank2.apk here.

Step 4, setup AndroLab server.
The back end for the InsecureBankv2 application is a simple python server running simple Flask and CherryPy web frameworks. The server component can be found in the AndroLabServer folder in the
InsecureBankv2 project source folder.

Download AndroLab source code. Navigate to the AndroLab directory. To set up the AndroLab server, use pip to install the necessary requirements.
C:\Python27\python.exe -m pip install -r requirements.txt

step 5,
Once all the requirements were installed, run the HTTP server on the default port 8888.
C:\Python27\python.exe app.py
If you encounter an “ImportError: No module named wsgiserver”, run
C:\Python27\python.exe -m pip install wsgiserver
If you encounter an “ImportError: No module named wsgiserver” error, change “from web.wsgiserver import CherryPyWSGIServer” to
from cheroot.wsgi import Server as CherryPyWSGIServer

then run again the “app.py” file to start the server.

view the available arguments for the AndroLab server component.
python app.py –help

Step, 6
Drag InsecureBankv2.pak file onto the emulator screen.
Or we use Android Debug Bridge (ADB) to connect to the emulator and install the InsecureBankv2 APK file.
adb install InsecureBankv2.apk
Once successfully installed, the application icon appears on the emulator.

Step 7, 
Once installed, open the app.


There are pre-defined users, login with either of them.
• dinesh/Dinesh@123$ 
• jack/Jack@123$
When the correct set of credentials is entered, the click of the Login button redirects us to the next screen.

Task 2
Login Vulnerabilities: Login Bypass
There are two ways to bypass login. One is using apk tool to find target activity and run it through adb. The other one is using drozer.

Option one: apk + adb
Step 1, reverse engineering the apk file.
Navigate to the apktool and run
apktool d C:\{Your Path}\InsecureBankv2.apk

Step 2, 
Look at the AndroidManifest.xml file. There are four exported Activities.


Find the activity name “PostLogin”. Using ADB, we can call this exported activity.
adb shell am start -n com.android.insecurebankv2/com.android.insecurebankv2.PostLogin

This will bring a new Activity to us that should only be available after logging in successfully, demonstrating that the login can be bypassed entirely.




Option two: drozer
Step 1, 
Run drozer in the device. The Drozer server runs on port 31415 of your device. We need to set up a suitable port forward so that our PC can connect to a TCP socket opened by the Agent inside the emulator. By default, Drozer uses port 31415. Forwarding port 31415 on the host to port 31415 on the device.
adb forward tcp:31415 tcp:31415
then, connect drozer to the device:
.\drozer console connect
This time we should find that drozer is successfully installed and working.


Step 2,
Find package name of the InsecureBankv2 application
dz> run app.package.list -f bank

determine attack surface:
dz> run app.package.attacksurface com.android.insecurebankv2
We will find the following information:

Attack Surface:
  5 activities exported
  1 broadcast receivers exported
  1 content providers exported
  0 services exported
    is debuggable
It enumerates exported activities along with the permissions necessary to invoke them, i.e. activities that can be launched by other processes on Android device. Let’s launch it
dz> run app.activity.info -a com.android.insecurebankv2
We will find:

Package: com.android.insecurebankv2
  com.android.insecurebankv2.LoginActivity
    Permission: null
  com.android.insecurebankv2.PostLogin
    Permission: null
  com.android.insecurebankv2.DoTransfer
    Permission: null
  com.android.insecurebankv2.ViewStatement
    Permission: null
  com.android.insecurebankv2.ChangePassword
    Permission: null
There are 5 exported activities. One can guess that LoginActivity is probably the one launched when the application starts. Here we will launch PostLogin activity to see what will happen.
dz> run app.activity.start --component com.android.insecurebankv2 com.android.insecurebankv2. PostLogin
Questions:
What if we launch ChangePassword? Show your screenshot.
Can an unauthenticated person have access to the device? What can he/she do after that?

If we want to fix this, remove the highlighted line.


Task 3, Hidden Create User Button for Admins
Step 1, find the source code for the “LoginActivity”.


We will find that the login activity has a hidden button. A check is performed to determine if a resource string called “is_admin” is set to “no”. If this is true, then the “setVisibility(8)” method is used to set the button invisible without taking any space for layout purposes. 

Step 2, patch the vulnerability.
Since this is a string resource, the value we need to modify should be located under the “/res/values/” directories in the strings.xml file. Open this file and change the “is_admin” value from “no” to “yes”, then save the changes.


Step 3,
Use apktool again to rebuild the application with the now modified strings.xml file.
apktool b -f -d InsecureBankv2/
We can find the new generated apk in folder dist.

Sign it.
Find the tool zipalign and apksigner, for me they are in folder


uninstall the unaltered version of the application from the emulator before installing the new APK.
# install
adb install button_InsecureBankv2-final.apk
Once successfully installed, open the application and a new button called “Create user” appears.

Step 7,
However, looking at the source code for the “createUser()” method shows that the button does not actually allow us to create a user, so this concludes the vulnerability.


Task 4, Insecure Logging
The “DoLogin” activity produces a debug log message whenever a user attempts to login.

These logs can be dumped using logcat. The command below will show all the log messages for the application while it is running.
adb logcat | grep "$(adb shell ps | grep com.android.insecurebankv2  | awk '{print $2}')"
If we attempt to login while logcat is running, we will see a log message that shows the username and password we used to successfully login.



Examining the code carefully, we find if the username is “devadmin”, the application does not require a password.  

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp

掃一掃在手機打開當(dāng)前頁
  • 上一篇:代寫COM682 Cloud Native Development 程序 Coursework
  • 下一篇:代寫  COMP3771 推薦系統(tǒng) 代寫python System Prototype
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)/客戶要求/設(shè)計優(yōu)化
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計優(yōu)化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發(fā)動機性能
    挖掘機濾芯提升發(fā)動機性能
    海信羅馬假日洗衣機亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網(wǎng) 排行網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区
    欧美电影精品一区二区| 亚洲成人动漫一区| 精品久久久久久久一区二区蜜臀| 色视频欧美一区二区三区| 性久久久久久| 久久美女性网| 欧美午夜一区二区三区 | 欧美日韩免费不卡视频一区二区三区| 久久精彩视频| 欧美午夜在线一二页| 欧美日本一区二区三区四区| 欧美人与禽zozo性伦| 91麻豆精品国产91久久久久久久久| 欧美丝袜丝nylons| 日韩女优av电影在线观看| 精品久久久久久久人人人人传媒| www成人在线观看| 欧美国产一区二区在线观看| ㊣最新国产の精品bt伙计久久| 亚洲欧美色一区| 亚洲18色成人| 国产麻豆欧美日韩一区| 成人理论电影网| 国产主播精品| 一本到不卡精品视频在线观看| 在线观看www91| 日韩美女视频在线| 国产精品每日更新| 日本人妖一区二区| 粉嫩在线一区二区三区视频| 91啪亚洲精品| 一本一本久久a久久精品综合妖精| 午夜在线视频一区二区区别| 欧美三级韩国三级日本三斤| 久久久欧美精品sm网站| 亚洲午夜免费视频| 国产成人在线视频免费播放| 国产精品国色综合久久| 国产亚洲成人一区| 欧美一区二视频| 亚洲免费观看视频| 国产精品一区免费在线观看| 国产综合色一区二区三区| 久久一区免费| 久久午夜免费电影| 午夜久久久久久久久久一区二区| 懂色av中文一区二区三区| 91久久亚洲| 日韩三区在线观看| 亚洲一线二线三线视频| 成人免费看视频| 亚洲欧美日本国产专区一区| 精品电影一区二区| 日韩成人av影视| 亚洲午夜精品久久| 欧美日韩一区三区| 有码一区二区三区| 成人精品小蝌蚪| 久久精品电影| 中文字幕制服丝袜成人av| 黄页网站大全一区二区| 日韩午夜免费| 精品久久人人做人人爱| 麻豆国产精品一区二区三区| 亚洲二区在线| 久久亚洲欧美国产精品乐播| 久久国产人妖系列| 国产精品一区二区a| 欧美zozo另类异族| 久久国产欧美日韩精品| 亚洲一区二区三区高清| 中文天堂在线一区| 不卡一区二区在线| 欧美色偷偷大香| 亚洲h精品动漫在线观看| 国内精品久久久久久久果冻传媒| 日韩免费观看高清完整版在线观看| 午夜精品免费在线观看| 亚洲人成毛片在线播放女女| 久久精子c满五个校花| 国产成人8x视频一区二区| 色8久久人人97超碰香蕉987| 亚洲一二三区在线观看| 亚洲国产三级| 亚洲欧洲www| 欧美激情第六页| 久久亚洲春色中文字幕久久久| 国产精品911| 91精品国产综合久久婷婷香蕉| 奇米精品一区二区三区在线观看一| 在线一区日本视频| 亚洲九九爱视频| 亚洲激情午夜| 亚洲欧美日韩系列| 国内精品久久久久久久影视蜜臀| 欧美韩国日本不卡| 欧美日韩免费观看一区=区三区| 欧美精品一区二区蜜臀亚洲| 成人高清视频在线观看| 日韩精品一区二区三区视频在线观看 | 久久精品1区| 亚洲成av人**亚洲成av**| 国产日韩欧美一区二区三区在线观看 | 欧美日韩国产乱码电影| 国内精品自线一区二区三区视频| 欧美亚洲高清一区| 激情小说亚洲一区| 欧美一级欧美一级在线播放| 国产精品一级在线| 亚洲精品一区二区三区99| 91网站最新网址| 日本一区二区三区视频视频| 国产精品大片免费观看| 亚洲人成在线播放网站岛国| 国产欧美日本在线| 天天综合网 天天综合色| 欧美午夜电影一区| 粉嫩蜜臀av国产精品网站| 久久综合色8888| 亚洲高清av| 日韩高清在线观看| 91精品久久久久久久久99蜜臂| k8久久久一区二区三区| 亚洲欧洲精品一区二区三区| 国产伦精品一区二区三区照片91| 青椒成人免费视频| 欧美一区二区在线播放| 欧美 日韩 国产在线| 亚洲精品v日韩精品| 91福利在线导航| www.亚洲国产| 亚洲最大成人网4388xx| 欧美日本韩国一区| 欧美日韩一区二区三| 亚洲国产美国国产综合一区二区| 欧美日韩国产在线播放网站| 91在线你懂得| 亚洲国产aⅴ天堂久久| 在线成人午夜影院| 狠狠色伊人亚洲综合网站色| 日本不卡一区二区三区高清视频| 欧美一区二区三区婷婷月色| 1024成人| 国产精品一区久久久久| 国产精品国产精品国产专区不蜜 | 精品国产sm最大网站免费看 | 中文字幕欧美一| 色呦呦日韩精品| 色综合天天视频在线观看| 亚洲成人中文在线| 亚洲精品一区二区在线观看| 亚洲影视在线| 99久久er热在这里只有精品15| 夜夜嗨av一区二区三区中文字幕| 日韩视频一区在线观看| 国产午夜精品一区二区三区欧美| 国产91精品露脸国语对白| 亚洲精品大片www| 欧美成人女星排名| 久久精品一区二区三区中文字幕 | 在线视频中文字幕一区二区| 欧美成人亚洲| 国产伦精品一区二区三区免费迷| 亚洲欧美另类久久久精品| 欧美电影免费提供在线观看| 性一交一乱一区二区洋洋av| 91美女精品福利| 麻豆91在线观看| 亚洲自拍偷拍av| 中文字幕欧美激情一区| 欧美成人官网二区| 在线观看日韩一区| 国产亚洲精品自拍| 欧美一区亚洲| 成人黄色一级视频| 极品少妇一区二区三区精品视频 | 91小视频在线免费看| 极品美女销魂一区二区三区免费| 亚洲国产综合色| 国产精品不卡一区| 国产人妖乱国产精品人妖| 制服视频三区第一页精品| 久久久久久一区| 国产伦精品一区二区三区| 在线欧美日韩| 午夜国产一区| 欧美jizzhd精品欧美巨大免费| 成人一区在线观看| 国产精品综合一区二区三区| 免费一级片91| 日韩va欧美va亚洲va久久| 亚洲午夜成aⅴ人片| ●精品国产综合乱码久久久久| 国产亚洲成年网址在线观看| 日韩欧美中文字幕一区| 欧美精品v日韩精品v韩国精品v| 在线观看欧美日本| 欧美在线色视频| 在线看日本不卡| 欧美主播一区二区三区美女|