Jump to content


Active Members
  • Posts

  • Joined

  • Last visited

Community Answers

  1. lartsch's post in Issue with env variables was marked as the answer   
    Well, while this still poses an issue, I fixed it for me in terms of DUCKY_LANG at least, by adding this to the config parser in croc_framework:
    if [[ "$line" == DUCKY_LANG* ]]; then export DUCKY_LANG="$(echo "$line"| cut -d ' ' -f2- | awk '{print tolower($0)}')" sed -i "/export DUCKY_LANG/d" /root/.profile echo "export DUCKY_LANG=${DUCKY_LANG}" >> /root/.profile croclog "LANGUAGE DETECTED ${DUCKY_LANG}" continue fi This will export the variable to all interactive shell sessions (through /root/.profile) and also make it available to all payloads. Works fine this way, but other environment variables are still not set, like TARGET_IP.
    // edit: plus see my other comment. these fixes are QUICK AND DIRTY, keep that in mind - if you find a better way, please tell here 🙂
  2. lartsch's post in Fix for matchless payloads not running was marked as the answer   
    Hey all,
    I found myself in the situation that any matchless payloads I wrote (e.g. payloads without a MATCH sequence) would not run on boot of the Key Croc. I tried many things, like setting ATTACKMODE HID with and without specific hardware properties, attaching a keyboard even though it should not be necessary etc. Nothing worked.
    While debugging I found the matchless payload detection in the "croc_framework" file (/usr/local/croc/bin) being badly implemented. The grep would not reliably detect non-match payloads and also did not take into account commented lines (#) or whitespace. This can be found in line 538 in the function execute_non_match_payloads() in the original 06/2020 firmware. The original line 538 is:
    for p in $(find /root/udisk/payloads -type f | xargs grep -c 'MATCH'|grep 0$|cut -d':' -f1) Replace it with:
    for p in $(find /root/udisk/payloads -type f | xargs grep -cHP '^(?=[\s]*+[^#])[^#]*(MATCH)' | grep 0$ | cut -d':' -f1) ... and now find yourself with working matchless payloads! For me, these are really important and provide great use cases.
    Best regards,
  3. lartsch's post in Reboot from shell? was marked as the answer   
    I found a solution:
    reboot -f OR
    systemctl --force reboot  
  • Create New...