user41568: 
Using Arduino, how can I detect that the switch is on? I have access to the wire within the red rectangle only. That's because the switch is closely connected to the car body (ground). When the handbrake is up, the switch is pushed by a coil to touch car body and close the circuit. And when the handbrake is down, the switch go away from the car body and the circuit is open.


user41570: Wrap the wire around a ferrite or some iron core and detect magnetic field.

user23211: If you can modify the cabling, you can add a shunt resistor in series and measure the voltage drop between the terminals. This way you can measure the current draw that would be 0 if the switch is open and something if the switch is closed.
Other way you can use an ACS712 Current Sensor.

user37523: Based on your comments:
"It's the handbrake switch button..." and "..if the switch is closed, the voltage would be zero as the ground, and if the switch is open, it will read 12 V.",
you could splice into the wire and use it as an input for the Arduino. You can NOT connect it directly to an Arduino because 5V is the maximum voltage permitted on a digital input (assuming your Arduino is running at 5V).
There are several ways to connect it to the Arduino safely, such as an opto-isolator, a level-shifter or using passive components.
This circuit using 2 resistors and a zener diode may work for you:

Be sure to connect the vehicle ground to the Arduino GND.

user27653: If you truly only have access to the red rectangle content, and not the Ground or +12V supply, you could use an opto-isolator, assuming you can use enough of the wire in the red rectangle to be able to form a voltage divider to get at least 1-2 mA through the input side of the opto.

41568: <p><a href="https://i.stack.imgur.com/zgn7r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zgn7r.png" alt="circuit"></a></p>

<p>Using Arduino, how can I detect that the switch is on? I have access to the wire within the red rectangle only. That's because the switch is closely connected to the car body (ground). When the handbrake is up, the switch is pushed by a coil to touch car body and close the circuit. And when the handbrake is down, the switch go away from the car body and the circuit is open.
<a href="https://i.stack.imgur.com/xsQkE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xsQkE.jpg" alt="switch"></a></p>
 41570: <p>Wrap the wire around a ferrite or some iron core and detect magnetic field.</p>
 23211: <p>If you can modify the cabling, you can add a shunt resistor in series and measure the voltage drop between the terminals. This way you can measure the current draw that would be 0 if the switch is open and something if the switch is closed.
Other way you can use an ACS712 Current Sensor.</p>
 37523: <p>Based on your comments:</p>

<p>"It's the handbrake switch button..." and "..if the switch is closed, the voltage would be zero as the ground, and if the switch is open, it will read 12 V.",</p>

<p>you could splice into the wire and use it as an input for the Arduino. You can NOT connect it directly to an Arduino because 5V is the maximum voltage permitted on a digital input (assuming your Arduino is running at 5V).</p>

<p>There are several ways to connect it to the Arduino safely, such as an opto-isolator, a level-shifter or using passive components.</p>

<p>This circuit using 2 resistors and a zener diode may work for you:</p>

<p><a href="https://i.stack.imgur.com/1F0uT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1F0uT.png" alt="enter image description here"></a></p>

<p>Be sure to connect the vehicle ground to the Arduino GND.</p>
 27653: <p>If you truly only have access to the red rectangle content, and not the Ground or +12V supply, you could use an opto-isolator, assuming you can use enough of the wire in the red rectangle to be able to form a voltage divider to get at least 1-2 mA through the input side of the opto.</p>
