The woman and her son where within a home in Lochgreen Avenue around 5.05pm on Sunday when two men entered brandishing weapons.
Both were rushed by ambulance to Ayr Hospital after the woman received a cut to her hand and the man’s arm was seriously injured.
They have since been discharged.
The suspects are described as both being white. One was approximately 6ft in height and of heavy build. He was wearing a black balaclava, a black jacket or parka-style coat with black trousers.
The second man was in his mid-twenties, around 5ft 5 inches in height and of medium build with light brown chin-length hair.
He was wearing a light coloured jacket or hooded top.
The two suspects may have been using a small black-coloured car.
Detective Sergeant Jane Hogg of Ayr Police Office said: “This was a terrifying attack. We are continuing to investigate the motive behind this incident, however one line of enquiry is that it could have been a case of mistaken identity.
“Officers have been in Lochgreen Avenue in Troon speaking to people. They are studying CCTV footage from the local area to gather more information to identify the two men responsible.”
Information can be passed to South Ayrshire CID via 101 or anonymously to Crimestoppers on 0800 555 111.