One cannot just go and buy and sell on the Stock Exchange. He/she must use an intermediary.
However, they can buy and sell directly from a friend, acquaintance or someone who wants to sell.
Or they can buy and sell on the Standing Stock Exchange in front of the Exchange.
Trading outside the stock exchange is not a crime. According to the law there is nothing against it. But both the price and Vigilant about the forgery of the Share Certificate to be a good person.