Post by wisma » Wed Mar 27, 2024 2:56 am

Good afternoon,

I noticed that today someone turned off the site twice. There are about 500 pages of logs on the live site, and it is difficult to search them. I have access only to myself and I changed passwords twice, but it did not help. It will take a long time to figure out this problem, so I think it will be faster to disable the site shutdown function?
Last edited by wisma on Thu Mar 28, 2024 1:07 pm, edited 1 time in total.

Newbie

Posts

Joined
Fri Apr 05, 2019 10:33 pm

Post by OSWorX » Wed Mar 27, 2024 11:15 am

If you really expect answer(s) and help, read this here before: viewtopic.php?t=200480

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by SohBH » Wed Mar 27, 2024 12:59 pm

It's got to be some kind of vulnerability added by an extension.

Web Development for service businesses serious about online growth


User avatar
Active Member

Posts

Joined
Mon Nov 02, 2020 12:01 am
Location - Malaysia

Post by wisma » Wed Mar 27, 2024 8:42 pm

OSWorX wrote:
Wed Mar 27, 2024 11:15 am
If you really expect answer(s) and help, read this here before: viewtopic.php?t=200480
I think I wrote it correctly. I'm using CMS version 3.0.3.8. How can I remove the site shutdown function from the CMS?
-----
Regarding the modules, I understand that myself, but I haven't found in the logs which module was responsible for disabling the site. As I wrote above, there are too many logs to search through manually.



update^
I found some suspicious attempts in the logs. However, it is relatively easy to maintain a pool of 1000 proxies and avoid getting banned.


[Wed Mar 27 01:13:40.738620 2024] [autoindex:error] [pid 877443] [client 66.249.66.206:33922] AH01276: Cannot serve directory /var/www/wisma/data/www/*/image/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
[Wed Mar 27 01:24:11.328452 2024] [authz_core:error] [pid 878616] [client 34.125.240.71:42404] AH01630: client denied by server configuration: /var/www/wisma/data/www/*/ads.txt, referer: https://*/uk-generator-honda-eu-70-is
[Wed Mar 27 01:24:11.336256 2024] [authz_core:error] [pid 878617] [client 34.125.240.71:42418] AH01630: client denied by server configuration: /var/www/wisma/data/www/*/app-ads.txt, referer: https://*/uk-generator-honda-eu-70-is
[Wed Mar 27 01:24:17.098637 2024] [authz_core:error] [pid 878659] [client 34.94.137.71:60254] AH01630: client denied by server configuration: /var/www/wisma/data/www/*/app-ads.txt, referer: https://*/uk-generator-honda-eu-70-is
[Wed Mar 27 01:24:17.098944 2024] [authz_core:error] [pid 878658] [client 34.94.137.71:60240] AH01630: client denied by server configuration: /var/www/wisma/data/www/*/ads.txt, referer: https://*/uk-generator-honda-eu-70-is



Or can you tell me the approximate code that needs to be found? I'm talking about the one that is responsible for disabling the site? I understand that it is related to the configuration.

Newbie

Posts

Joined
Fri Apr 05, 2019 10:33 pm

Post by wisma » Wed Mar 27, 2024 11:08 pm

Code: Select all

 public function cacheDelete() {
	  if ($this->validateModification()) {
		  $this->load->language('octemplates/theme/'. $this->oct_theme);

		  $maintenance = $this->config->get('config_maintenance');

		  $this->load->model('setting/setting');

		  $this->cache->delete('octemplates');

			$this->model_setting_setting->editSettingValue('config', 'config_maintenance', true);

	    if (isset($this->request->get['store_id'])) {
	      $store_id = $this->request->get['store_id'];
	    } else {
	      $store_id = 0;
	    }

		  $setting_info = $this->model_setting_setting->getSetting('theme_'. $this->oct_theme, $store_id);

Newbie

Posts

Joined
Fri Apr 05, 2019 10:33 pm

Post by Cue4cheap » Thu Mar 28, 2024 12:02 am

wisma wrote:
Wed Mar 27, 2024 2:56 am
Good afternoon,

I noticed that today someone turned off the site twice. There are about 500 pages of logs on the live site, and it is difficult to search them. I have access only to myself and I changed passwords twice, but it did not help. It will take a long time to figure out this problem, so I think it will be faster to disable the site shutdown function?
There is no such thing as a "Site shutdown function".
As others have said you need to give us relevant information.

Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by wisma » Thu Mar 28, 2024 1:53 am

I'm trying to disable the website's maintenance mode permanently. Here's why I'm confused:

The system seems to have the functionality for maintenance mode:
There's a controller and code ($maintenance = $this->config->get('config_maintenance');) to manage it.
There's a corresponding entry in the MySQL database.
Yet, I can't find a way to disable it permanently.
My question:

In which files can I remove code to permanently disable the ability to put the site in maintenance mode?
Additional context (optional):

The website recently received updates to the ReMarket template and ocfilter module. These updates might be coincidental to the issue, but I'm unsure.
There haven't been any problems for over a month until yesterday's outages.

Newbie

Posts

Joined
Fri Apr 05, 2019 10:33 pm

Post by OSWorX » Thu Mar 28, 2024 2:25 am

wisma wrote:
Thu Mar 28, 2024 1:53 am
The website recently received updates to the ReMarket template and ocfilter module. These updates might be coincidental to the issue, but I'm unsure.
There haven't been any problems for over a month until yesterday's outages.
You haven't read my comment here: posting.php?mode=quote&p=868510&sid=109 ... a#pr868488
Why do you thinkl I highlighted that here: viewtopic.php?t=200480 (doing it again!!).
And especially this here: viewtopic.php?t=200480#p707152 (read carefully and slow!).
And this here: viewtopic.php?t=53294

But you do not want to hear nor reading!

With this post you declare, that you have installed (several) other extensions/theme/mods/hacks/whatever ..
So better follow the advices and post what's important (for us) - or do you think we are all clairvoyants ?

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by wisma » Thu Mar 28, 2024 2:38 am

It seems you misunderstood my question.

My question is:

In which files can I find the code for disabling the maintenance mode in OpenCart 3.0.3.8?
What code do I need to delete to permanently remove this functionality?
Context:

I am aware of the controller and code $maintenance = $this->config->get('config_maintenance');.
I have checked the developer's code, but it is encrypted against hacking.
I am not interested in the reason for the issue; I just want to remove the maintenance mode function entirely.
The website is currently indexed and displayed as "Technically closed" in Google, which is unacceptable.
I understand this is a drastic measure, but it is necessary to prevent future problems.
I apologize for any confusion.

Please help me by providing the specific file names and code I need to delete.

Thank you for your understanding.

Newbie

Posts

Joined
Fri Apr 05, 2019 10:33 pm

Post by wisma » Thu Mar 28, 2024 2:41 am

I am not interested in errors because they are hidden and are admin errors, for the user too. I am only interested in removing the function out of the box.

Additional details:

The user is not interested in fixing the errors that are causing the maintenance mode to be enabled.
The user wants to remove the maintenance mode function completely from the OpenCart software.
The user wants to do this so that the maintenance mode cannot be enabled by anyone, including administrators.

Newbie

Posts

Joined
Fri Apr 05, 2019 10:33 pm

Post by wisma » Thu Mar 28, 2024 2:51 am

Okay, lets go, I've been reading your replies carefully, but it's difficult for me to prepare a complete list of files because:

I'm new to the website's webmaster and don't know where some of the files were purchased or downloaded.
Some of the files are pirated.
I don't think anyone wants to go through 100,500 files when you can simply remove the function out of the box.
What do you think? Do you want me to burden you with searching for a small line of code in all these files?

It would be much easier to just tell me what to delete, and it would only cause a small error on the website that users wouldn't even see.

I understand that this is not an ideal solution, but it's the quickest and simplest one.

Please let me know if this is possible.

Thank you for your time!

P.S.

I can provide you with FTP/SSH access if needed.
I can also provide you with more information about the website if it helps.

Attachments

3.jpg

3.jpg (176.94 KiB) Viewed 6313 times

2.jpg

2.jpg (190.19 KiB) Viewed 6313 times

1.jpg

1.jpg (269.02 KiB) Viewed 6313 times

Last edited by wisma on Thu Mar 28, 2024 3:04 am, edited 3 times in total.

Newbie

Posts

Joined
Fri Apr 05, 2019 10:33 pm

Post by wisma » Thu Mar 28, 2024 2:53 am

add atach/


opencart 3.0.3.8

Attachments

6.jpg

6.jpg (134.96 KiB) Viewed 6308 times

5.jpg

5.jpg (116 KiB) Viewed 6308 times

4.jpg

4.jpg (165.03 KiB) Viewed 6308 times

Last edited by wisma on Thu Mar 28, 2024 1:00 pm, edited 1 time in total.

Newbie

Posts

Joined
Fri Apr 05, 2019 10:33 pm

Post by ADD Creative » Thu Mar 28, 2024 2:57 am

Look at the action_pre_action in system/config/catalog.php. You could remove the 'startup/maintenance' entry. Else look in catalog/controller/startup/maintenance.php.

However, I wouldn't recommend it as a final solution. If it is being changed by someone and not just a bug, they probably have access to a lot more.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by wisma » Thu Mar 28, 2024 3:07 am

ADD Creative wrote:
Thu Mar 28, 2024 2:57 am
Look at the action_pre_action in system/config/catalog.php. You could remove the 'startup/maintenance' entry. Else look in catalog/controller/startup/maintenance.php.

However, I wouldn't recommend it as a final solution. If it is being changed by someone and not just a bug, they probably have access to a lot more.
Thank you! This is exactly what I needed.

I understand that this is a workaround, but the website's behavior shows that only this function is accessible. If there are any problems in the future, I think I will be able to solve them. For now, I just need to remove this feature.

Thank you again for your help.

I really appreciate it!

Newbie

Posts

Joined
Fri Apr 05, 2019 10:33 pm

Post by wisma » Thu Mar 28, 2024 3:26 am

ADD Creative wrote:
Thu Mar 28, 2024 2:57 am
Look at the action_pre_action in system/config/catalog.php. You could remove the 'startup/maintenance' entry. Else look in catalog/controller/startup/maintenance.php.

However, I wouldn't recommend it as a final solution. If it is being changed by someone and not just a bug, they probably have access to a lot more.
Sorry, I can't understand this code a little:
catalog/controller/startup/maintenance.php

Code: Select all

<?php
class ControllerStartupMaintenance extends Controller {
	public function index() {
		if ($this->config->get('config_maintenance')) {
			// Route
			if (isset($this->request->get['route']) && $this->request->get['route'] != 'startup/router') {
				$route = $this->request->get['route'];
			} else {
				$route = $this->config->get('action_default');
			}			
			
			$ignore = array(
				'common/language/language',
				'common/currency/currency'
			);
			
			// Show site if logged in as admin
			$this->user = new Cart\User($this->registry);

			if ((substr($route, 0, 17) != 'extension/payment' && substr($route, 0, 3) != 'api') && !in_array($route, $ignore) && !$this->user->isLogged()) {
				return new Action('common/maintenance');
			}
		}
	}
As I understand it, what could have been made simpler? just change this code:

Code: Select all

	// Show site if logged in as admin
			$this->user = new Cart\User($this->registry);

			if ((substr($route, 0, 17) != 'extension/payment' && substr($route, 0, 3) != 'api') && !in_array($route, $ignore) && !$this->user->isLogged()) {
				return new Action('common/maintenance');

Newbie

Posts

Joined
Fri Apr 05, 2019 10:33 pm

Post by straightlight » Thu Mar 28, 2024 7:46 am

In system/config/catalog.php file,

find:

Code: Select all

'startup/maintenance'
replace with:

Code: Select all

//'startup/maintenance'
This should resolve the issue.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by wisma » Thu Mar 28, 2024 12:59 pm

thanks everyone for the help

Newbie

Posts

Joined
Fri Apr 05, 2019 10:33 pm
Who is online

Users browsing this forum: No registered users and 4 guests