Barba dropped the ball over the line in the 24th minute before Chad Townsend barged his way over three minutes later for the visitors' first try.
A brilliant offload from Cronulla centre Jack Bird laid on a try for his winger Valentine Holmes to cut the Dogs lead to two on the half hour.
That was before Sam Kasiano crashed over just short of the break for a halftime score of 18-10 to Canterbury.
NSW hopeful Wade Graham did his State of Origin selection chances no harm in a strong game, that included a lovely inside ball for Barba to scoot away for the second half's first try in the 57th minute.Ricky Leutele was denied a try soon after.
The Dogs, led strongly up front by skipper James Graham and David Klemmer, who both ran for 200m, couldn't trouble the scorers after halftime.
The Sharks enjoyed the better field position in the latter stages before Leutele slid over out wide to set the scene for Maloney's match-winning conversion that skimmed off the post and over the crossbar.
Lichaa left the field with a hamstring injury in the 60th minute and didn't return.Sharks coach Shane Flanagan praised Maloney's composure.
"That's why he gets paid the big bucks," he said.
"He likes those pressure situations.
"If he didn't kick it I'd be looking at his pay packet."
"We showed plenty of resolve, in the end the belief they have in the group at the moment is just to hang in there and believe in each other and fight right to the last minute."
Feki suffered a second half groin strain but is expected to be fit for the Sharks' next match against North Queensland at Shark Park on Monday week.
Dogs coach Des Hasler felt his side had done enough to win it.
"I thought we were the better side, as much as we made it hard for ourselves," he said.
"We didn't help ourselves at the very end there we should have shut that down.
"Maloney is too good a goalkicker to give those opportunities to.
"All in all it is a very disappointed football side in there."
Hasler reserved special praise for Will Hopoate, who played his first game in a month, after sitting out the Dogs' Sunday games due to his religious beliefs.
"I thought he was outstanding," Hasler said.
"He carried the ball very strongly."
- AAP