Preface
Hello everyone, from this article, I want to sharing about my experience get and do some a job from Upwork Freelancer.
About the Job
After longtime waiting, trying to send many proposal from any job posting, finally, I get my first time job from Upwork. The title of my first job is A quick easy question for Ubuntu guru for $10. I am very happy to get that job in first time be a freelancer, and it is in Upwork. Really happy. Not to big cost for the job, but, I think it’s a opportunity to develop myself and know the process get a job from this big freelancer application, Upwork.
The job I think, is very match for Me. Cause, I am is Linux user since 2012 until now. See the job posting I have done below.
So, based on that job posting, I must assistance someone or client, to find the .so file, who based on his assume, that the following function “verify_address” after domain/URL is based on some .so file or its some content of .so file.
How to Solve the Job
My client, live in Australia. And we talk more after sign and accept my contract via message in Upwork. I am assistance he with all of my best I can. With my English poor, I think it is not problem.
This is my step to do assistance my client about this job. I take from the message function from Upwork, cause this project, is been long time ago.
Client : Thank you for the reply. Just confirming, I know how to find files. That is not the problem. I want to find "what" is listening on that port and "where" it is located. Are you able to do that ?
Me : Based on your job posting, you want to find what the exactly file .so who confirming the verify_address. I will search the files, and open the files one by one to track the verify_address. That is my step. Are you able to do that? I will try my best
Client : Thank you Vicky I appreciate the reply. I have an idea of what the file name is. But there are a few of the same names on the drive in different locations. I have located those. The problem is I do not know which one is actually being used by the web service on that port. That is what I am trying to find out.
Me : How much the file with .so extension? My one of idea is to rename the file, maybe one by one. And see the effect of the website.
Client : about 5 I think. That is a reasonable idea. I will try that and let you know. Is it possible the app is cached in Ubuntu ? I tried them all by renaming them all but it is still working.
Me : Is still working? Maybe is cached. Try to clear the cache
Client : Just tried rebooting but it still works. Perhaps it is loading something different to what I thought. Would it be a script in init.d that would be running at boot time or somewhere else?
Me : Its very interesting. So this problem is not about .so files? If this is still about the .so files, maybe we may to open one by one the files .so, to see what is the veryfied_address from.
Client : They
are all the same . so file name. But they are just in different locations
and most should no be used by anything. It seems to me that one is being
loaded at boot time and then that one is listening on that 18090 port. The
problem is find out ethics one. But.. If I have renamed them all and
rebooted, and the site still works, then it looks to me like it is a different
.so that is now listening on that port.
This is why I think it is necessary to try and find what is being loaded at boot time. But I'm not sure how apart from looking at init.d for example. Is there a command that shows what apps are listening on what ports?
Me : Command that shows what app are listening on what ports? I try to remember first what is the command ->
sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN
sudo ss -tulpn | grep LISTEN
sudo lsof -i:22 ## see a specific port such as 22 ##
Thats is what usually I try
Client : Ok thanks I will try those
Me : Try this to
sudo nmap -sTU -0 your_ip_address
Client : Ok
thanks. Getting closer. :) Ok this "might" be it. WHat does
this look like to you.
Does it look like the actual run file and then then other two files are what loads it at boot time ?
Me : I think all that files. 2 files under systemd, that is usually start at boot time. But I confuse about the link to text file.
Client :
[Unit]
# service description
Description=Liveness crow api server
After=syslog.target
[Service]
Type=simple
# user and group -- to run service
User=www-data
Group=www-data
# project working directory
WorkingDirectory=/opt/liveness_serve
# Command to execute when the service is started
## absolute path to liveness model serving
ExecStart=/opt/liveness_serve/liveness_api
# Automatically restart the service if it crashes
Restart=on-failure
# service shows up immediately in systemd's logs
StandardOutput=syslog
StandardError=syslog
[Install]
# Tell systemd to automatically start this service when the system boots
# (assuming the service is enabled)
WantedBy=multi-user.target
so it looks like the app called liveness_api is started at boot time.
Would you agree ?
Me : I agree. That files is what we search.
Client : Great. You have been very helpful Vicky. I do appreciate your time and patience with me. Last question. I thought applications (executable's as such) have to have an extension such as .so etc. But this file does not have any extension. So in Ubuntu it is allowed for an executable to not have an extension ?
Me : Your welcome Mark. Based on my experience, files in unix system is files with or without extension. Executable file is not what the extension, but the permission.
Client : Interesting, Ok thanks for that. Job completed - Thank you. :)
Me : Thank you Mark. Happy to meet you. Hope you more succes and stay healthy
Conclusion
Based on the project and the chat, I have finished the job completely. Alhamdulillah. So, the problem is the function is automatically start when the system startup in first time boot. So we must do to know what the file is. And open the files that we assumed that’s is the file, and read the file correctly.
Thank You for reading my experience, hopefully can help You when you have any problem about to know what files are containing about some function and how to search and navigating the search.