Note that xorg X Input system cannot bind a combination of more than one mouse button to a certain action. If you have installed the GNOME environment (default for Ubuntu) you already have the software needed to get the '6th' and '7th' mouse buttons working (forward/backward on most mice)! Each main button (left and right) count as one, the downward click on the wheel counts as another, and the up/down scrolling also count as one each (2+1+2=5).
It's important to note that Ubuntu considers a standard two button, scroll/click-wheel mouse to have five buttons. This page describes how to configure Ubuntu to fully utilize a mouse with multiple buttons, wheels, and other controls.