Advertisements

Blog Archives

#MacOsX : Fix Mountain Lion Slow Shutdown

Ok, actually there are many good reasons to wait a bit of time before send a SIGKILL to processes (like giving them time to write things on disk or finish an upload on the iCloud), however the “slow” shutdown could be annoying, so try this:

sudo launchctl unload /System/Library/LaunchDaemons/com.apple.coreservices.appleevents.plist

sudo defaults write /System/Library/LaunchDaemons/com.apple.coreservices.appleevents ExitTimeOut -int 2

sudo launchctl load /System/Library/LaunchDaemons/com.apple.coreservices.appleevents.plist

This set the shutdown timeout to 2 sec instead of the default value (20).

Advertisements

#MacOsX : Web Hacking with Burp Suite

This is a legendary tool developed by the author of The Web Application Hacker’s Handbook: Finding and Exploiting Security Flaws (2nd edition).

Unfortunately there is no native Mac Os X version but Corsaire packed one. Since they updated the site, the link to download it provided in the aforementioned book is broken, so I will provide a new working one of the recently released version 1.5 1.6 of Burp Suite Free.
All rights reserved to Corsair and Portswigger.

The version at this link
DOWNLOAD HERE
is now outdated (it also requires JDK 6, which is no longer supported).
A free binary version for Mac OS has been made available:
Burp Suite Free Edition

See also here for a [much less powerful] alternative.

#MacOsX : Enable Quicklook Text Selection [OUTDATED]

Quicklook is a beautiful and powerful feature of Mac Os X (take a look here to know what is capable of) but it is somewhat weird that it doesn’t allow text selection.

To enable text selection in Quicklook:

defaults write com.apple.finder QLEnableTextSelection -boolean YES

killall Finder

NOTE: this trick stopped working with Mac OS X 10.11 and later.
 

#MacOsX : Show Remote Disks

There are Macs without disk drives. You can access CD/DVDs from another Mac over the network allowing remote disk.

This option allows you to always see remote drives within Finder:

defaults write com.apple.finder EnableODiskBrowsing -boolean YES

killall Finder

#MacOsX : Web Hacking with Paros

Paros is a web proxy that allows to intercept and modify all HTTP and HTTPS data between server and client, including cookies and form fields.

I will not explain how and why you use it, but if you are really interested, please take a look on the book: The Web Application Hacker’s Handbook: Discovering and Exploiting Security Flaws.

Unfortunately there is no native Mac Os X version but Corsaire packed one. Since they updated the site, the link to download it provided in the aforementioned book is broken, so I will provide a new working one. All rights reserved to Corsair and Paros Team.

DOWNLOAD HERE

Paros is no longer developed (it also requires JDK 6 which is not longer supported).
An alternative is a fork of it, Zed Attack Proxy, maintained by OWASP:
Zed Attack Proxy (ZAP)

 

#WP7 : LG Optimus 7 Unlock + Interop Unlock + Root Tools

If you want install XAP files without a developer account you can do it by modifying some registry keys:

  1. First go to MFG and follow the path 7.Engineer Menu > 6.Other Settings > Edit Registry
  2. Set the following fields:
    • Select ROOT_PATH: HKEY_LOCAL_MACHINE
    • Input SUB_PATH: Comm\Security\LVMod
    • Input KEY and Select data type:  DeveloperUnlockState   DWORD
    • Input data: 1
  3. Click Set button

To avoid Zune undo to default settings:

  1. Go to MFG and follow the path 7.Engineer Menu > 6.Other Settings > Edit Registry
  2. Set the following fields:
    • Select ROOT_PATH: HKEY_LOCAL_MACHINE
    • Input SUB_PATH: Software\Microsoft\DeviceReg
    • Input KEY and Select data type: PortalUrlProd   DWORD
    • Input data: leave this field empty
  3. Click Set button
  1. Go to MFG and follow the path 7.Engineer Menu > 6.Other Settings > Edit Registry
  2. Set the following fields:
    • Select ROOT_PATH: HKEY_LOCAL_MACHINE
    • Input SUB_PATH: Software\Microsoft\DeviceReg
    • Input KEY and Select data type: PortalUrlInt   DWORD
    • Input data: leave this field empty
  3. Click Set button

From now on your device is unlocked in developer mode, but you cannot install homebrew apps that modify registry keys. You need Interop Unlock:

  1. Go to MFG and follow the path 7.Engineer Menu > 6.Other Settings > Edit Registry
  2. Set the following fields:
    • Select ROOT_PATH: HKEY_LOCAL_MACHINE
    • Input SUB_PATH: Software\Microsoft\DeviceReg\Install
    • Input KEY and Select data type: MaxUnsignedApp   DWORD
    • Input data: 300
  3. Click Set button

NOTE1: if you want install very nasty apps then you need WP7 Root Tools.

NOTE2: Unlock & Interop Unlock works on WP7 Tango too.

NOTE3: to lock device again set DeveloperUnlockState to 0 (zero).

#MacOSX : IP Scanner Pro, Network Scanning for Dummies

You are accustomed to incomprehensible command line tools???

Finally I have the right solution: IP Scanner Pro

It’s all about friendlyness!!! You can ping, wake up, insert into whitelist, etc all the devices found with just one click.

I will show you just an image, you don’t need anything else! 😉

NOTE: I have hidden MAC address.

#MacOSX [*NIX]: MAC Address Spoofing

MAC Address is a unique identifier of 48 bits assigned to network interfaces.

This Address is unique in the world, so it does identify you, everywhere.

From a Security & Privacy perspective this is not good at all!!!

How to modify it:

  1. Open Terminal app.
  2. Type:
    sudo ifconfig [en0-en1] ether [MAC Address]

    • where you can choose en0 for wired ethernet interface or en1 for airport interface
    • MAC Address is something like FF:FF:FF:FF:FF:FF
      where there are 6 groups of 2 exadecimal symbols separated by colons (:)
  3. Insert your Administrator password.
  4. Go to Network System Preferences, select active interface and push Advanced… button.
  5. In TCP/IP tab click on Renew DHCP Lease button.
  6. You should now see your new MAC Address in Hardware tab.

NOTE: you can set Configure: Manually in Hardware tab to manually set MAC Address and avoid using Terminal.

NOTE2: if you do not renew DHCP Lease you may loose network connectivity.

NOTE3: if you have set MAC Address through Terminal it will be restored to it own default after reboot or shutdown.

NOTE4: some Hotels or private Acces Point use MAC Filtering to prevent abuse of their network. The changing of MAC Address allow you circumviate this kind of restrictions (see MAC Spoofing). This is NOT legitimate, so if you are not an evil user and you need emergency network access, try to set your MAC Address to FF:FF:FF:FF:FF:FF (could not work of course). This way System Administrator will readily understand what is going on. 😉

#MacOSX : Disable Hibernation & SSD Tweaks

SSD are based on NAND Flash which have limited writes life. Currently 25nm chips support 3000-5000 cycles then they become read only.

This limitation makes very important avoid unneeded writes on the disk.

Moreover power save technologies can give some trouble (of course on SandForce controllers).

So this are some steps to Tweak your host system to give you the best experience:

  1. Turn off hibernation. To do this, open terminal app and type:
    sudo pmset -a hibernatemode 0

    Enter admin password and let’s do it the magic.
    This will prevent GB of writes every time you close the lid of your notebook.

  2. Remove unused hibernation file to free up as much space as your RAM:
    sudo rm /var/vm/sleepimage
  3. Open System Preferences and go to Energy Saver, than uncheck
    Put the hard disk(s) to sleep when possible
    both on Battery and Power Adapter tabs.
    This will prevent disk freezes and beachballs.
  4. If you have a SATA 2 interface and a Nvidia chipset on your Mac, check to have 3 Gbps Negotiated Link Speed.
    Go to Serial-ATA section in System Information app to take a look of your disk(s).
    This will ensure optimal performance of SSD.

NOTE: there are more Hacks, like enabling TRIM for non Apple supported SSDs but they give more troubles that other therefore I advice against to engage in similar enterprises.

NOTE 2: WARNING!!! Apple MacBook Air and MacBook Pro Update 2.0 seems to change the way “safesleep” is handled. If you currently have safesleep disabled in order to free up the drive space required by the sleep image, this will cause it to come back and even setting hibernatemode = 0 won’t change it. Quick untested FIX:

cd /var/vm
sudo rm sleepimage
sudo ln -s /dev/null sleepimage

#WP7 : Enable Hidden MFG Menu

This hidden menu will give you super NERD power so, here we go!!! 😀

  1. Open telephone and call ##634#.
  2. MFG use a password to enter in secret menu. Type 277634#*# and click ENTER.
  3. Enjoy and remember: “From great Power comes great Responsibilities”.

NOTE: you don’t need this steps every time, from now on you’ll have a MFG app in the list! 😉

%d bloggers like this: