You need the correct tools and fixings for this job. First drill into the masonry with a masonry bit. Use a wood bit for drilling through the wood. Insert an appropriate screw through the wood and into the masonry pilot hole. You may need rawl plug to ensure a tight fit.
You will have to use concrete anchors to get the wood to attach to concrete. Many big home supply stores carry these anchors. You will also need a hammer drill to drill the holes for the anchors to go into. You could also use a ram set.