电信光猫HG2xx超级管理员权限获取方法

测试环境:

设备基本信息

设备型号: HG225GS
设备标识号: xxxxxxxxxxx
硬件版本: BCM.V2.0
软件版本: HG225GS_D1.00_JS1606

1、在浏览器上输入 http://192.168.1.1/logoffaccount.html,设置隐藏用户改为启用,这样就可以用工程账号登陆了。

2、登录工程帐号(用户名:fiberhomehg2x0密码:hg2x0),登录网址http://192.168.1.1/

3.打开http://192.168.1.1/backupsettings.conf下载“backupsettings.conf文件”,用记事本打开,Ctrl+F查找“password”,复制<Password>标记中间一行64BASE加密的字符串。

4.telecomadmin+密码登录

Caddy无法启动报错:caddy.service: Main process exited, code=exited, status=1/FAILURE 解决方案

https://caddy.community/t/caddy-wont-start-could-not-start-http-server-for-challenge-listen-tcp-80-bind-permission-denied/2543

修改服务文件,取消以下注释:

;CapabilityBoundingSet=CAP_NET_BIND_SERVICE
;AmbientCapabilities=CAP_NET_BIND_SERVICE
;NoNewPrivileges=true

开启unicorn对NEON(STP SIMD)的支持

CPACR_FPEN_MASK = (0x3 << 20)
CPACR_FPEN_TRAP_NONE = (0x3 << 20)

cpacr = mu.reg_read(UC_ARM64_REG_CPACR_EL1)
cpacr = (cpacr & ~CPACR_FPEN_MASK) | CPACR_FPEN_TRAP_NONE
mu.reg_write(UC_ARM64_REG_CPACR_EL1, cpacr)
var CPACR_FPEN_MASK uint64 = (0x3 << 20)
var CPACR_FPEN_TRAP_NONE uint64= (0x3 << 20)
cpacr, err := mu.RegRead(uc.ARM64_REG_CPACR_EL1)
if err!=nil{
    panic(err.Error())
}
cpacr = (cpacr & ^CPACR_FPEN_MASK) | CPACR_FPEN_TRAP_NONE
mu.RegWrite(uc.ARM64_REG_CPACR_EL1, cpacr)

IDA切换ARM和THUMB指令

ARM AND THUMB MODE SWITCH INSTRUCTIONS

This processor has two instruction encodings: ARM and THUMB.
IDA allows to specify the encoding mode for every single instruction.
For this IDA uses a virtual register T. If its value is zero, then
the ARM mode is used, otherwise the THUMB mode is used.
You can change the value of the register T using
the ‘change segment register value’ command
(the canonical hotkey is Alt-G)

ollvm特征

我简单给你说ollvm的特征
ollvm的bcf的话
可以去找两个同级的sub
然后
算了不说了
两个同级的bb,不搞编译器的叫loc吧。不叫sub
有一个是循环自己
还有一个是往下走的
伪代码是一大串if true xxxx嵌套
这就是bcf,循环自己的那个就是假的控制流
ollvm的fla很明显。直接看控制流图就行了
splitbb就是一个函数里有一大段很短的loc
之间都是无条件跳转
substitution就是一堆看起来应该被简化的逻辑/数学运算连在一起
每家都说是自己写的
刘欣也说是自己写的我抄他的
谁知道的
不过有几个应该是有点干货
不知道哪家就是了
不说了
光在设计上就是为了解决问题
*解决这些问题
再加额外功能和现有的优化
谁知道他们
实际上汇编层不是if true
是一个恒量表达式

ida+debugserver真机调试ios app

1.xcode随便新建一个工程,在真机上跑一遍。这样/Developer/usr/bin 下就会有debugserver。
2.sftp把debugserver拉回本地,在同目录下新建plist文件entitlements.plist,内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/ PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.springboard.debugapplications</key> <true/>
    <key>run-unsigned-code</key>
    <true/>
    <key>get-task-allow</key>
    <true/>
    <key>task_for_pid-allow</key>
    <true/>
</dict>
</plist>

3.然后给debugserver重签名

codesign -s - --entitlements entitlements.plist -f debugserver

 
4.传回真机/usr/bin/debugserver.
5.brew install usbmuxd,把iphone端口映射到本地 iproxy 1234 1234
6.在ida的debug设置里debugger -> debgger options ->set specific options去掉Launch debugserver automatically
7.启动/usr/bin/debugserver *:1234
8.ida里开始调试,输入ip和端口号1234