Do you need a patent?
It's one thing to protect your
Intellectual Property (which is already protected by law), and a whole other game to
file for a patent.
Filing for a patent is a lot of work, money (you'll inevitably need to hire lawyers for this) and energy, to get your invention registered. There's a ton of ground work to be done to prove that your invention is unique and creative, and it can take years before the patent is filed. Also, keep in mind that patents are not usually respected (there's a lot of problems with patents in practice) and that if someone infringes on your patent, it will be a very difficult (time, money, lawyers) to prove infringement and get reparation. Cases take years (if I understand correctly).
On the other hand, there are other IP protection laws that you benefit from like Copyright law or Trademark law. So, before you actually set your mind on filing for a patent, make sure you consider alternative protection.
I still want a patent
I found
this document to describe the patent law in Lebanon. I also found
one lawyer firm advertising services to file for patents. There are probably others and they'll know better than me how to answer you.
Note that the language of the patent law in Lebanon seems to be very geared towards industrial inventions, and it's unclear if software (I assume you're patenting a software idea?) is considered eligible for patent (For instance, in Europe, software patents are invalid).