Skip to main content

Posts

Showing posts from December, 2022

mdev mtp fix

 https://github.com/slashbeast/mdev-like-a-boss/blob/master/helpers/dev-bus-usb  https://raw.githubusercontent.com/slashbeast/mdev-like-a-boss/master/mdev.conf   nano /etc/mdev.conf # Populate /dev/bus/usb.   SUBSYSTEM=usb;DEVTYPE=usb_device;.* root:root 660 */opt/mdev/dev-bus-usb   # Don't create old usbdev* devices.  usbdev[0-9].[0-9]* root:root 660 ! # comment these lines # load drivers for usb devices #usb[0-9]+    root:root 0660 */lib/mdev/usbdev  cat /opt/mdev/dev-bus-usb --------------------------------------------------------------------------------------------------------- #!/bin/sh # Takes care of /dev/bus/usb devices. # # The mdev.conf gives us limited options on how to handle ownership, so a fix has come as script. # # Features: # - Support smartcard devices. Adjust device group to one that let pcscd open them. # - If Android device is plugged in, make it possible for users in plugdev group to open them (mtp, fastboot, adb

alpine .profile alias

 alias pkl='apk -u list' alias D=doas alias pku='doas apk update' alias pkuu='doas apk upgrade' alias pks='apk search' alias pkii=' doas apk add' alias pki='apk info' alias pkp='apk policy' alias pkd='apk dot'

wpa_supplicant without root using linux capabilities

run wpa_supplican with Linux capabilities instead of privileged process   apk add libcap-utils doas setcap cap_net_admin,cap_net_raw+ep  /sbin/wpa_supplicant ## sudo chown wpas wpa_supplicant  ##optional  ## sudo chmod 0100 wpa_supplicant  ##optional  This combination of setcap, chown, and chmod commands would allow wpas user to execute wpa_supplicant with additional network admin/raw capabilities.   cat ./wifi wpa_supplicant -B -Dnl80211 -iwlan0 -c ~/.wpa/config doas udhcpc -i wlan0 -q  cat ~/.wpa/config ctrl_interface=/home/kai/.wpa update_config=1 network={     ssid="somessid"     psk="strongpassword" } wpa_cli -p ~/.wpa remove capabilities setcap -r </path/to/bin> find caps of bin getcap /sbin/wpa_supplicant search all bins with caps getcap -r /  https://git.codelinaro.org/clo/external-wlan/supplicant/-/tree/android-n-iot-preview-2/wpa_supplicant https://book.hacktricks.xyz/linux-hardening/privilege-escalation/linux-capabilities

winpe

 https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/?view=windows-11 https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install   https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions?view=windows-11   Right-click Deployment and Imaging Tools Environment and select Run as administrator . copype amd64 C:\winpe_amd64    Dism /mount-image /imagefile:c:\WinPE_amd64\media\sources\boot.wim /index:1 /mountdir:c:\winpe_amd64\mount    add optional components (oc) https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-add-packages--optional-components-reference?view=windows-11  components are in folder  C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\         Dism /Add-Package /Image:"C:\WinPE_amd64\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Win

google download links

https://dl.google.com/earth/client/advanced/current/GoogleEarthWin.exe   ##not supported   ##diff paltform 32/64 bit https://dl.google.com/dl/earth/client/advanced/current/googleearthprowin.exe https://dl.google.com/dl/earth/client/advanced/current/googleearthprowinx64.exe https://www.google.com/intl/en/chrome/?standalone=1     ##diff paltform 32/64 bit  platform=win64 = 64 bit platform=win64 = 32 bit  https://www.google.com/chrome/?standalone=1&platform=win64 https://www.google.com/chrome/?standalone=1&platform=win   for all users  https://www.google.com/chrome/?system=true&standalone=1&platform=win64 # portable version https://portableapps.com/apps/internet/google_chrome_portable src:: https://support.google.com/earth/answer/168344#zippy=%2Cdownload-a-google-earth-pro-direct-installer https://support.google.com/chrome/answer/95346?hl=en&ref_topic=7439538#zippy=%2Cwindows

 mtk old bootrom(brom) flash bypass

Download tools  download exploits  https://github.com/MTK-bypass/exploits_collection/releases latest: https://github.com/MTK-bypass/exploits_collection/archive/refs/tags/v1.6.zip got::  exploits_collection-1.6.zip  download bypass utility  https://github.com/MTK-bypass/bypass_utility/releases   latest: https://github.com/MTK-bypass/bypass_utility/archive/refs/tags/v.1.4.2.zip got:: bypass_utility-v.1.4.2.zip   download python https://www.python.org/downloads/ https://www.python.org/ftp/python/3.11.1/python-3.11.1-amd64.exe extract : 7z x bypass_utility-v.1.4.2.zip 7z x  exploits_collection-1.6.zip copy playloads and default_config.json5 file from exploits*.zip to bypass folder  install python with pip and select add to path pip install pyusb json5   Install libusb filter   download libusb-win32 https://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.6.0/libusb-win32-devel-filter-1.2.6.0.exe/downloa d Launch filter wizard, click next Connect powered off phone