Jump to content

Issues with sed and grep on a loot file


Recommended Posts

Hi guys,

I have trouble getting sed and grep on a text file looted using a modified samba exfiltrator.

I use firmware 1.6 and the command used to gather the IP addresses is "(Get-NetIPAddress -AddressFamily ipv4).IPAddress" (will later try to gather LAN IP addresses).

I tried the commands on Kali without an issue, but on the bash bunny it does not work as expected.

root@bunny:~# cat /loot/smb/e/DESKTOP-63THJCH/hacked.txt
root@bunny:~# cat /loot/smb/e/DESKTOP-63THJCH/hacked.txt | grep "169"
root@bunny:~# sed -i '/^169\.[0-9]/d' /loot/smb/e/DESKTOP-63THJCH/hacked.txt
root@bunny:~# sed '/^169\.[0-9]/d' /loot/smb/e/DESKTOP-63THJCH/hacked.txt


I am using the commands wrong ?


Link to comment
Share on other sites

  • 2 weeks later...

Hm, I tried the commands exactly as you posted here and it worked for me (on the bunny), so there isn't a mistake with the commands.

Try "apt-get upgrade grep", maybe that will help.

What also kind of annoys me are those  ▒▒. Try deleting those and try it again.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...