![]() |
|
Helpful Responses - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Hacking (https://sinister.li/Forum-Hacking) +--- Forum: Website & Server Hacking (https://sinister.li/Forum-Website-Server-Hacking) +--- Thread: Helpful Responses (/Thread-Helpful-Responses) |
Helpful Responses - Dyme - 06-05-2014 Hey all. Recently I decided to make a compilation thread with some of my responses/replies that I think would be of use to others. Most of these are from other competing forums, but I figured that doesn't matter much as information can be useful no matter where it was originally posted. Opening Notes: This is just another way in which people might me able to learn more effectively versus your average tutorial. Of course, I would love for people to respond my responses in a way to continue the discussion! I'm open to criticism (regarding technical topics) as that will only further promote the learning and outside-the-box thinking that anyone aspiring to be in this field needs. Other off-topic questions are also welcome. I'll be updating this thread with whatever replies in the future that I deem to be useful. If you have made a reply relating to web & server security that you think would be beneficial to others, feel free to post it here. This thread is designed to help people learn by discussion, so please do join in! #1 - Never fall victim to a php backdoor again: A32 Wrote:Why would the webadmin get a wild idea of checking each and every file with md5 and compare it to the backups (if any :hehe Brb writing something that will float your boat. Will update this post when done. Edit: Admin runs the following as soon as he finishes installing his web application: Code: find -name "*.php" -o -name ".htaccess" -exec md5sum "{}" \; > b4.txtThen the admin puts the following into a file and sets up a cronjob to run it every day: Code: #!/bin/bash
find -name "*.php" -o -name ".htaccess" -exec md5sum "{}" \; > af.txt
diff=`diff b4.txt af.txt`
if [[ -n $diff ]]; then
subject="MD5Sum Change in `hostname`"
email="admin@crapowebsite.com"
message="/tmp/email.txt"
echo -e "A PHP or htaccess file has been modified on the system. Below is the output of diff:\n\n$diff"> $message
/bin/mail -s "$subject" "$email" < $message
rm /tmp/email.txt
fiOnce this is done, the admin has to do nothing else for the rest of his website's existence regarding checking for php backdoors. The admin will now always be alerted by email whenever a PHP file is modified in a specified dir ("." in this example). This is just something I pulled out of my ass in ~15 minutes, so I know there are things I can do in terms of reliability and optimization. Nevertheless, this will work wonders and will take an admin 5 minutes tops to set up. I'm not saying that most admins practice something like this, but this is an unbelievably simple way of detecting the integrity of your php scripts with virtually no effort. #2 - A more effective way of using non-persistent XSS: ThatExploitTho Wrote:Non-persistent XSS in useful for jack shit unless someone is idiotic enough to fall for an obvious document.cookie URL Lol what? Why does someone need to click a "document cookie URL"? Non-persistent XSS can be effective from any website that you have write access to. Ex. >I gain shell access a website the user frequents. >I make a form that sends a request to the XSS vulnerable website with my desired payload, and insert it into the index page. >User goes to the website he frequents, the request is sent using his session, and my payload is executed. Exploitation is completed with absolutely zero direct interaction with the target user. Now if you can't get access to a website that you know the user will visit on his own, you could also pwn any other site and send him a link without it looking suspicious at all. So yes, there is a lot more you can do with a non-persistent XSS vuln than just send the target a "document cookie URL". What I described is a simple yet effective way to get your javascript payload eval'ed by your targeted user. It's a pity that most people don't think for themselves, and form opinions after they read countless of garbage tutorials. Think outside the tutorials and you might find a way to go beyond what you've been taught. RE: Helpful Responses - Ebola-chan - 06-05-2014 Removed, my posts are not to be available for this forum anymore. RE: Helpful Responses - Alan Turing - 06-17-2014 Nice thread Dyme. "ThatExploitTho" I know you're somewhere on this god damn forum RE: Helpful Responses - Adorapuff - 06-17-2014 After shelling a site, open a port, and run netcat -lvp {openport} then backconnect to yourip:port Secure this with a VPN or whatever, but this way you can work out a comand-line and can install a rootkit or such with relative ease to maintain access without leaving a php file on the server. RE: Helpful Responses - NBA - 06-18-2014 Even though I don't understand anything in this thread, it may be useful to other people so thanks for sharing this info RE: Helpful Responses - Adorapuff - 06-18-2014 (06-18-2014, 07:19 PM)NBA Wrote: Even though I don't understand anything in this thread, it may be useful to other people so thanks for sharing this info Which part don't you understand. He made it pretty straightforward. RE: Helpful Responses - NBA - 06-18-2014 (06-18-2014, 09:52 PM)Adorapuff Wrote: Which part don't you understand. He made it pretty straightforward. All of the "#!/bin/bash find -name "*.php" -o -name ".htaccess" -exec md5sum "{}" \; > af.txt diff=`diff b4.txt af.txt` if [[ -n $diff ]]; then subject="MD5Sum Change in `hostname`" email="admin@crapowebsite.com" message="/tmp/email.txt" echo -e "A PHP or htaccess file has been modified on the system. Below is the output of diff:\n\n$diff"> $message /bin/mail -s "$subject" "$email" < $message rm /tmp/email.txt fi" and "find -name "*.php" -o -name ".htaccess" -exec md5sum "{}" \; > b4.txt" Not really a tech dude RE: Helpful Responses - Adorapuff - 06-18-2014 (06-18-2014, 09:54 PM)NBA Wrote: All of the "#!/bin/bashThat's just a bash file, and he explains what it does. RE: Helpful Responses - NBA - 06-18-2014 (06-18-2014, 09:55 PM)Adorapuff Wrote: That's just a bash file, and he explains what it does. Oh alright * NBA acts likes he understands But seriously, I really don't understand this and cba to
RE: Helpful Responses - 3SidedSquare - 06-18-2014 (06-18-2014, 09:58 PM)NBA Wrote: Oh alright Unless you see a particular trick in bash you don't understand, I would recommend looking at the Official Documentation |