Jump to content

Sent From My Pineapple


telot

Recommended Posts

SentFromMyPineapple.png

Thats right and heres how I did it:

opkg update

opkg install --dest usb ssmtp

Modify /usb/etc/ssmtp/ssmtp.conf with these instructions (for gmail at least). I used the SSL port of 465 instead of 587 for TLS - I dunno, it didn't work with TLS for some reason...

ln -s /usb/etc/ssmtp /etc

Then

echo -e "From: MYEMAIL@MYDOMAIN.COM\nSubject: SUBJECT\nReply-to: MYEMAIL@MYDOMAIN.COM\n\nBODYHERE" | ssmtp -vvv MYOTHEREMAIL@MYDOMAIN.COM

And badda boom badda bing, email in my inbox.

Why you should care:

How about having a cron job to run a script that emails you reports at certain intervals?

How about if you're tcpdumping all packets on the pineapple and are waiting for a user to go to their company website and login. Write a script that greps out that URL from urlsnarf.log and emails you so you know to check your capture file

How about monitoring your pineapple inconspiciously in public (class, meetings, out to dinner with your wife and inlaws) because all you're doing is innocently checking your email?

Thats the big one for me - its just so commonplace to quick take a glance at a new email on your phone. Much more socially acceptable than staring at a pineapple status page that looks well...hackerish with its black background, green and white text...it looks like something a hacker would enjoy...and I do! But with the emailed status you're just checking the latest TPS reports real quick ya know?

Hope you all enjoy, I will surely share some scripts for emailing reports once created and hope you do the same

EDIT: Command to send urlsnarf log:

ssmtp -v user@domain.com < /www/pineapple/urlsnarf.log

telot

Edited by telot
Link to comment
Share on other sites

SentFromMyPineapple.png

Thats right and heres how I did it:

opkg update

opkg install --dest usb ssmtp

Modify /usb/etc/ssmtp/ssmtp.conf with these instructions (for gmail at least). I used the SSL port of 465 instead of 587 for TLS - I dunno, it didn't work with TLS for some reason...

ln -s /usb/etc/ssmtp /etc

Then

echo -e "From: MYEMAIL@MYDOMAIN.COM\nSubject: SUBJECT\nReply-to: MYEMAIL@MYDOMAIN.COM\n\nBODYHERE" | ssmtp -vvv MYOTHEREMAIL@MYDOMAIN.COM

And badda boom badda bing, email in my inbox.

Why you should care:

How about having a cron job to run a script that emails you reports at certain intervals?

How about a you're tcpdumping all packets on the pineapple and are waiting for a user to go to their company website and login. Write a script that greps out that URL from urlsnarf.log and emails you so you know to check your capture file

How about monitoring your pineapple inconspiciously in public (class, meetings, out to dinner with your wife and inlaws) because all you're doing is innocently checking your email?

Thats the big one for me - its just so commonplace to quick take a glance at a new email on your phone. Much more socially acceptable than staring at a pineapple status page that looks well...hackerish with its black background, green and white text...it looks like something a hacker would enjoy...and I do! But with the emailed status you're just checking the latest TPS reports real quick ya know?

Hope you all enjoy, I will surely share some scripts for emailing reports once created and hope you do the same

telot

awesome!! :) good work man!

Link to comment
Share on other sites

Thanks guys! I was hoping this one would be a hit

The emailing is working great but I'm having trouble getting bigger log files to go throgh...it seems ssmtp has some size limitations to whatever you're bringing into it. Heres my script that unfortunately fails:

#!/bin/bash

rm /usb/emaillog.log

touch /usb/emaillog.log

logread > /usb/emaillog.log

ssmtp -v user@domain.com < /usb/emaillog.log

The emails come through each time, but for some reason the body of email (where all the logs should be) is blank. If I cat /usb/emaillog.log its got all the latest log data. I try and send any other file it works fine. Such as

ssmtp -v user@domain.com < /www/pineapple/associations.log

and the list of victims comes through just fine.

Any thoughts on this? Unfortunately theres very little documentation on ssmtp, so if anyone has any experience with it, I'd love to hear about it

Thanks

telot

Edited by telot
Link to comment
Share on other sites

telot your my hero. right up there with darren snubs seb and everyone else here. this is a cool community.

If we all give, we all get my friend :) This community is something special no doubt about it

telot

Link to comment
Share on other sites

sorry LOL

I am asking a genuine question.

I was thinking something similar, using a cron job to rotate the logs and email them at regular intervals, ie, have 13 rotating logfiles, each rotating at 5 min intervals, and the sendmail sending out every hour.

My other option would have been a netcat type

I wanted to do that instead of leaving it on the usb card

I havent used linux since i was in university! Give a 'newbie' some credit, I'm only thinking out loud ! :)

Link to comment
Share on other sites

I am asking a genuine question.

I was thinking something similar, using a cron job to rotate the logs and email them at regular intervals, ie, have 13 rotating logfiles, each rotating at 5 min intervals, and the sendmail sending out every hour.

My other option would have been a netcat type

I wanted to do that instead of leaving it on the usb card

I havent used linux since i was in university! Give a 'newbie' some credit, I'm only thinking out loud ! :)

do you mean sending the logs then clearing them so to free up memory and making the pineapple potentially last for days or weeks?

I think having them also saved to usb would be a good idea

I like your idea of netcat because I don't use 3G and would like a way to get the logs through a ssh session or maybe an app?

Link to comment
Share on other sites

do you mean sending the logs then clearing them so to free up memory and making the pineapple potentially last for days or weeks?

I think having them also saved to usb would be a good idea

I like your idea of netcat because I don't use 3G and would like a way to get the logs through a ssh session or maybe an app?

Send them to free up space.

I was thinking of sending them into tcpdump/snort to see packets and initiate logs.

I love the idea of being able to get an hourly report for example, and see what kind of data has gone through.

It'll be my Easter project to get some sort of automated sniffer going, and hell maybe fit that into a module (even a basic one)

Link to comment
Share on other sites

Thx for sharing Telot, it's awesome! : )

You're quite welcome

Send them to free up space.

I was thinking of sending them into tcpdump/snort to see packets and initiate logs.

I love the idea of being able to get an hourly report for example, and see what kind of data has gone through.

It'll be my Easter project to get some sort of automated sniffer going, and hell maybe fit that into a module (even a basic one)

This would be a great implementation! Thats exactly how I want to run it as well - hourly reports would be just about right. I've been swamped at work so I haven't been able to write it all out, but if you want to do it over easter, please share!

telot

Link to comment
Share on other sites

  • 1 year later...

Hi ssmtp cannot send attachments try the line below

echo -e "to: email@domain.com\nsubject: subject\n"| (cat - /usb/emaillog.log) | ssmtp email@domain.com
#!/bin/bash
rm /usb/emaillog.log
touch /usb/emaillog.log
logread > /usb/emaillog.log
echo -e "to: email@domain.com\nsubject: subject\n"| (cat - /usb/emaillog.log) | ssmtp email@domain.comm
Edited by vtecone
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.

Guest
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...