Overriding Drupal core base class I need to override the block configuration form in Drupal 8. 

To override the configuration form for a new block we are creating can be done by implementing BlockBase::buildConfigurationForm method.

But I need to alter the configuration form for all the blocks which means overriding the BlockBase class. How can I implement this?

Is there a generic way to override all Drupal Core classes?
No, you can't change the base class. This is a PHP language construct, it's not possible to override it.

I'm not exactly sure what you are trying to do but it is likely that what you are looking for is a plain old hook_form_alter() + third party settings on the block config entity.

The Block class D8 sandbox is a simple module that is doing exactly this and allows to configurabe custom CSS classes for every block.

Note that this is on a different level, you are altering the block config entity and it will only apply to how Drupal core/block.module uses block plugins but not e.g. page_manager. Doing it in a more generic way is simply not possible.