Most of us would say it as, “Hey, kumusta/kamusta ka?”. We commonly incorporate English words, e.g., hi, hey, hello, in our Tagalog sentences. If an element of surprise is involved, as for example, we meet a friend unexpectedly on the street, we might say “Uy! Kumusta ka?” “Uy!” is a common expression of serendipity.
Maksim's answer would also be correct, but it's something you should say to someone you know very well so that your use of “hoy” will not be considered offensive. However, to be on the safe side, you might as well avoid using the word as part of a friendly greeting. “Hoy!” is like saying “Hey, you!” We normally use that to call the attention of someone who we think is doing something wrong. For example, if you see a stranger prowling in your yard, then you say “hoy!” to call his attention and maybe drive him away. Because of that, when you use it to greet someone, it would come across as if you actually dislike the person and the greeting therefore, insincere. As Youko said, it would sound rude. Only a close friend would take it as a jest, hopefully.