What you are asking for is a buck converter. That is a switching power supply that makes a lower voltage (and higher current) from a higher voltage (and lower current). There are many chips available to do most of this for you. You will have to provide the inductor and usually a few other parts. Some chips require you to provide the switching element, others have them built in.
If this is meant to replace the battery in your drill, then it will probably work. If you intend this to work together with the battery and even charge it, then it gets rather more complex and you can't just connect a fixed 18 V supply to the battery.
A battery doesn't operate as a constant-voltage source at the nominal output voltage, the voltage will be within some usable range. In your case the cells pictured are lithium thionyl-chloride cells made by Saft, which are NOT rechargeable. This simplifies things a great deal as there won't be circuitry on the board to deal with battery charging. The photo shows only two wires going to the battery pack, so there aren't extra wires for e.g. authentication against counterfeit packs. It appears to be simple plus and minus.
The cell data sheet claims an open-circuit voltage (when new at 20C temperature) of 3.67V and nominal voltage of 3.6V. This chemistry has a very flat voltage profile at 20C compared to some other chemistries, so it will spend most of the time around 3.6V and fall steeply as it gets close to full discharge. At other temperatures it may operate at a somewhat different voltage. In the data sheet they discharge to 2.0V for the discharge curves, so it's safe to assume the cell is considered dead below that voltage and should not be discharged further.
It should be a reasonable assumption that your circuit board will run from any applied voltage between 2.0V-3.67V per cell, multiplied by 5 cells gives 10.0V-18.35V. It's possible the board doesn't run as low as 2.0V per cell, since there isn't much energy in the cells below a somewhat higher voltage, unless operating at high or low temperature which changes the voltage profile. The safest guess would be to power the board from 5 x 3.6V = 18.0V, but it would probably work at least over the range down to 5 x 3.0V and possibly down to 5 x 2.0V.
I wouldn't be surprised if the board could operate from an even lower voltage, since the battery may simply run into switching or linear regulator(s), which might only need to have enough headroom above the output voltage to keep running properly. If the board has a regulator creating a 12VDC power rail then the minimum input would be at least 0.5V or even 1.5V above that. If the power rails on the board are all 5.0V or 3.3V then it might power up from an input as low as 6.0V. If you measure across any large bulk capacitors that appear to be on power rails it would tell you what those rail voltages are. Looking up the voltage regulator IC(s) would also tell you something, if you can read them.
For safety of yourself and the board, you should add a fast-blow fuse in line with the V+ wire, so if something goes wrong the power supply doesn't keep frying the board. Measure current into the board to be sure it's about the same as current from a battery. Measure the output of your power adapter before applying it to the board to be sure it's really the voltage you think it is. If using a big wall wart rather than a regulated wall adapter or bench supply, the voltage won't be exactly what it says on the outside except at a certain load current.
More information from the manufacturer's website:
http://www.saftbatteries.com/battery-search/ls-lsh
Best Answer
In this case BAT1 has at the plus side 18 V, and at the BAT2 minus side 0 V, because GND is connected there.
simulate this circuit – Schematic created using CircuitLab
Below, the GND is in between the batteries, so on either side the difference is 9V, resulting in +9V at the + side of BAT1 and -9V at the - side of BAT2.
simulate this circuit