10 Commits

Author SHA1 Message Date
hyugogirubato
24d400e7ff Release v1.0.6 2024-04-26 18:44:01 +02:00
hyugogirubato
1d2d1b356d remove mkshrc 2024-04-21 16:34:02 +02:00
hyugogirubato
56a2e0ea45 add mkshrc readme 2024-04-21 16:20:35 +02:00
hyugogirubato
6fbafa9fb0 release mkshrc 2024-04-21 16:12:29 +02:00
hyugogirubato
276208c472 update mkshrc
- add busybox env
- fix user
- add sudo
- update man
- frida in dev
2024-04-20 15:55:35 +02:00
hyugogirubato
80da61e0bb fix subprocess codec 2024-04-19 21:52:59 +02:00
hyugogirubato
da3b1f95d9 Update shell.sh 2024-04-14 19:11:26 +02:00
hyugogirubato
9554598970 Delete functions_x86.xml 2024-04-14 18:50:20 +02:00
hyugogirubato
d8a8273db6 Release v1.0.5 2024-04-08 19:15:39 +02:00
hyugogirubato
305d861f11 disabled import analysis 2024-04-08 18:59:07 +02:00
7 changed files with 38 additions and 64168 deletions

View File

@@ -4,6 +4,32 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.0.6] - 2024-04-26
### Added
- Added `mksrc` script to manually improve Android shell interaction.
- Added `editor` script for a text editor within the Android shell.
### Changed
- Removed example from the XML functions to prevent misunderstandings.
- Enhanced the Android shell functionality.
### Fixed
- Fixed encoding issues with ADB commands, addressing issue [#3](https://github.com/hyugogirubato/KeyDive/issues/3).
## [1.0.5] - 2024-04-08
### Added
- Added a function known from SDK 33 (arm64-v8a).
### Fixed
- Removed import analysis that was causing the JavaScript script to crash.
## [1.0.4] - 2024-04-06
### Added
@@ -68,6 +94,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Initial release of the project, laying the foundation for future enhancements and features.
[1.0.6]: https://github.com/hyugogirubato/KeyDive/releases/tag/v1.0.6
[1.0.5]: https://github.com/hyugogirubato/KeyDive/releases/tag/v1.0.5
[1.0.4]: https://github.com/hyugogirubato/KeyDive/releases/tag/v1.0.4
[1.0.3]: https://github.com/hyugogirubato/KeyDive/releases/tag/v1.0.3
[1.0.2]: https://github.com/hyugogirubato/KeyDive/releases/tag/v1.0.2

View File

@@ -1,19 +0,0 @@
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias logcat='logcat -v color'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias ipa='ip -c a'
alias rm='rm -rf'
tree() {
path=${1:-.}
find ${path} -print | sort | sed 's;[^/]*/;|---;g;s;---|; |;g'
}
clear

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
from .cdm import *
from .vendor import *
__version__ = '1.0.4'
__version__ = '1.0.5'

View File

@@ -23,7 +23,7 @@ class Cdm:
# Mapping of function names across different API levels (obfuscated names may vary).
'rnmsglvj', 'polorucp', 'kqzqahjq', 'pldrclfq', 'kgaitijd',
'cwkfcplc', 'crhqcdet', 'ulns', 'dnvffnze', 'ygjiljer',
'qbjxtubz', 'qkfrcjtw', 'rbhjspoh', 'zgtjmxko'
'qbjxtubz', 'qkfrcjtw', 'rbhjspoh', 'zgtjmxko', 'igrqajte'
# Add more as needed for different versions.
}
@@ -63,7 +63,8 @@ class Cdm:
"""
# https://source.android.com/docs/core/architecture/configuration/add-system-properties?#shell-commands
properties = {}
for line in subprocess.getoutput(f'adb -s "{self.device.id}" shell getprop').splitlines():
sp = subprocess.run(f'adb -s "{self.device.id}" shell getprop', capture_output=True)
for line in sp.stdout.decode('utf-8').splitlines():
match = re.match(r'\[(.*?)\]: \[(.*?)\]', line)
if match:
key, value = match.groups()
@@ -135,7 +136,8 @@ class Cdm:
# https://github.com/frida/frida/issues/1225#issuecomment-604181822
# Iterate through lines starting from the second line (skipping header)
processes = {}
for line in subprocess.getoutput(f'adb -s "{self.device.id}" shell ps').splitlines()[1:]:
sp = subprocess.run(f'adb -s "{self.device.id}" shell ps', capture_output=True)
for line in sp.stdout.decode('utf-8').splitlines()[1:]:
try:
line = line.split() # USER,PID,PPID,VSZ,RSS,WCHAN,ADDR,S,NAME
name = ' '.join(line[8:]).strip()

View File

@@ -83,7 +83,8 @@ const hookLibrary = (name) => {
'address': ptr(parseInt(symbol.address, 16) + parseInt(library.base, 16))
}));
} else {
functions = [...library.enumerateExports(), ...library.enumerateImports()];
functions = library.enumerateExports();
// functions = [...library.enumerateExports(), ...library.enumerateImports()];
target = functions.find(func => OEM_CRYPTO_API.includes(func.name));
}

View File

@@ -29,8 +29,8 @@ if __name__ == '__main__':
logger.info('Version: %s', extractor.__version__)
# Ensure the ADB server is running
exitcode, _ = subprocess.getstatusoutput('adb start-server')
if exitcode != 0:
sp = subprocess.run('adb start-server', capture_output=True)
if sp.returncode != 0:
raise EnvironmentError('ADB is not recognized as an environment variable, see https://github.com/hyugogirubato/KeyDive/blob/main/docs/PACKAGE.md#adb-android-debug-bridge')
# Initialize the CDM handler with the specified or default device